Minor fix for config parsing, eliminates some prelude spacing on value form key/value...
authorskeezix <skeezix@flotsam-vm.(none)>
Fri, 5 Mar 2010 01:35:36 +0000 (20:35 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Fri, 5 Mar 2010 01:35:36 +0000 (20:35 -0500)
minor change to notifyd's help message

apps/pndnotifyd.c
lib/pnd_conf.c

index 8294c8b..134bcc5 100644 (file)
@@ -113,7 +113,7 @@ int main ( int argc, char *argv[] ) {
       }
 
     } else {
-      printf ( "%s [-d] [##]\n", argv [ 0 ] );
+      printf ( "%s [-d] [-l] [##]\n", argv [ 0 ] );
       printf ( "-d\tDaemon mode; detach from terminal, chdir to /tmp, suppress output. Optional.\n" );
       printf ( "-n\tDo not scan on launch; default is to run a scan for apps when %s is invoked.\n", argv [ 0 ] );
       printf ( "-l#\tLog-it; -l is 0-and-up (or all), and -l2 means 2-and-up (not all); l[0-3] for now. Log goes to /tmp/pndnotifyd.log\n" );
index aece00d..e2114a5 100644 (file)
@@ -179,6 +179,11 @@ pnd_conf_handle pnd_conf_fetch_by_path ( char *fullpath ) {
       *mid = '\0';
       mid++;
 
+      // skip past any heading space for the key
+      while ( *mid && isspace ( *mid ) ) {
+       mid++;
+      }
+
       //printf ( "key head: '%s'\n", head );
       //printf ( "key mid: '%s'\n", mid );
 
@@ -206,7 +211,7 @@ pnd_conf_handle pnd_conf_fetch_by_path ( char *fullpath ) {
        }
 
       } else {
-       // key/value pairing
+       // key only
        char *v;
 
        // form the actual new key