4 void f (const Key * source)
6 Key * dup = keyDup (source);
12 void g (const Key * source, KeySet * ks)
14 Key * dup = keyDup (source);
17 ksAppendKey (ks, dup);
22 Key * c = keyNew("user/from/h", KEY_END);
27 /* the caller will see the changed key k */
33 KeySet * ks = ksNew(0);
35 Key * key = keyNew ("user/test/name",
38 printf ("Created key %s with value %s\n",
39 keyName(key), keyValue(key));
42 printf ("Key is unchanged with value %s\n",
46 printf ("A duplication was appended in keyset with name %s\n",
50 printf ("Key has changed to name %s with value %s\n",
51 keyName(key), keyValue(key));
53 /* key is yet independent */
57 origKey = ksNext (ks);
58 key = keyDup (origKey);
59 printf ("A duplication of the key %s with value %s\n",
60 keyName(key), keyValue(key));