1 #include "uniconfroot.h"
11 system(
WvString(
"ps -o pid,sz,vsz,rss,trs,drs,dsiz,cmd %s",
17 before = (
const char *)sbrk(0);
23 const char *after = (
const char *)sbrk(0);
25 printf(
"%p, %p, %ld\n", before, after, (
long)(after-before));
32 printf(
"wvstring: %d bytes\n",
sizeof(
WvString));
42 uni.
mount(
"ini:/tmp/dns.ini2",
true);
44 system(
"touch /tmp/dns.ini2");
47 system(
"touch /tmp/dns.ini2");
50 for (
int x = 0; x < 1e8; x++)
52 system(
"touch /tmp/dns.ini2");
60 WvString s(
"this is a big long line with a really big "
61 "long string involved in it somehow");
62 for (
int i = 0; i < 18000; i++)
74 WvString s(
"this is a big long line with a really big "
75 "long string involved in it somehow");
77 for (
int i = 0; i < 18000; i++)
78 l.append(&(a[i] = s),
false);
char * edit()
make the string editable, and return a non-const (char*)
bool refresh() const
Refreshes information about this key recursively.
void commit() const
Commits information about this key recursively.
void xset(WvStringParm key, WvStringParm value) const
A different way to say cfg[x].setme(y).
void remove() const
Removes this key and all of its children from the registry.
WvString is an implementation of a simple and efficient printable-string class.
IUniConfGen * mount(WvStringParm moniker, bool refresh=true) const
Mounts a generator at this key using a moniker.
A plain UniConfTree that holds keys and values.
Represents the root of a hierarhical registry consisting of pairs of UniConfKeys and associated strin...
This is a WvList of WvStrings, and is a really handy way to parse strings.
This iterator performs depth-first traversal of a subtree.