5 void BailOut (char * msg)
7 fprintf (stderr, "%s\n", msg);
14 KeySet * myConfig = ksNew(0);
18 /* Open the Key Database */
20 BailOut ("Could not open Key Database");
22 /* Get the hello world keyset */
23 if (kdbGetByName(h, myConfig, "/", 0) == -1)
24 BailOut ("Could not get Keys");
26 /* Find the key in the keyset */
27 if ((myKey = ksLookupByName (myConfig, "/hello", 0)) == NULL)
28 BailOut ("Could not Lookup Key");
30 /* Get the value of the key */
31 if ((myValue = (char*) keyValue (myKey)) == NULL)
32 BailOut ("Could not get Keyvalue");
34 /* Actually print the key */
35 printf ("%s\n", myValue);
36 /* Close and free KeySet */
38 /* Close the Key database */