No, really, evmapperd can handle a max-hold configged key, even when its a non-repeat...
[pandora-libraries.git] / apps / pnd_info.c
index a2acb4b..86908bf 100644 (file)
@@ -78,36 +78,45 @@ int main ( int argc, char *argv[] ) {
   }
 
   pnd_pxml_handle h = NULL;
+  pnd_pxml_handle *apps = NULL;
   if ( pnd_pnd_seek_pxml ( f ) ) {
     if ( pnd_pnd_accrue_pxml ( f, pxmlbuf, pxmlbuflen ) ) {
-      h = pnd_pxml_fetch_buffer ( "pnd_run", pxmlbuf );
+      apps = pnd_pxml_fetch_buffer ( "pnd_run", pxmlbuf );
     }
   }
 
   fclose ( f );
 
-  if ( ! h ) {
+  if ( ! apps ) {
     printf ( "ERROR: Couldn't pull PXML.xml from the pndfile.\n" );
     exit ( 0 );
   }
 
-  // display sections
-  for ( i = 0; i < sections; i++ ) {
-    char *t;
+  // iterate across apps
+  while ( *apps ) {
+    h = *apps;
+
+    // display sections
+    for ( i = 0; i < sections; i++ ) {
+      char *t;
+
+      if ( strcasecmp ( section [ i ], "description" ) == 0 ) {
 
-    if ( strcasecmp ( section [ i ], "description" ) == 0 ) {
+       printf ( "Section: %s\n", section [ i ] );
 
-      printf ( "Section: %s\n", section [ i ] );
+       if ( ( t = pnd_pxml_get_description_en ( h ) ) ) {
+         printf ( "%s\n", t );
+       } else {
+         printf ( "Not supplied by PXML.xml in the pnd-file\n" );
+       }
 
-      if ( ( t = pnd_pxml_get_description_en ( h ) ) ) {
-       printf ( "%s\n", t );
-      } else {
-       printf ( "Not supplied by PXML.xml in the pnd-file\n" );
       }
 
-    }
+    } // for
 
-  } // for
+    // next
+    apps++;
+  } // while
 
   return ( 0 );
 } // main