git.openpandora.org
/
pandora-libraries.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5d1dbf1
)
libpnd; make pndvalidator slightly less useless.. can illustrate some pnd iteration
author
skeezix
<skeezix@flotsam-vm.(none)>
Tue, 22 Feb 2011 20:07:55 +0000
(15:07 -0500)
committer
skeezix
<skeezix@flotsam-vm.(none)>
Tue, 22 Feb 2011 20:07:55 +0000
(15:07 -0500)
apps/pndvalidator.c
patch
|
blob
|
history
diff --git
a/apps/pndvalidator.c
b/apps/pndvalidator.c
index
b21ab46
..
b3831f3
100644
(file)
--- a/
apps/pndvalidator.c
+++ b/
apps/pndvalidator.c
@@
-79,12
+79,22
@@
int main ( int argc, char *argv[] ) {
printf ( "Got back a meaningful list of PXMLs.\n" );
printf ( "Got back a meaningful list of PXMLs.\n" );
- pnd_pxml_handle h = *pxmlapps;
+ unsigned int appiter = 0;
+ while ( 1 ) {
- while ( h ) {
+ pnd_pxml_handle h = pxmlapps [ appiter ];
+
+ if ( ! h ) {
+ break;
+ }
+
+ // if you want to just go direct to struct - not wise!
+ //pnd_pxml_t *p = pxmlapps [ appiter ];
+ //printf ( "uid %s\n", p -> unique_id );
/* check the content
*/
/* check the content
*/
+ printf ( "Found name: '%s'\n", pnd_pxml_get_app_name_en ( h ) );
// check for required fields
// check for required fields
@@
-99,13
+109,11
@@
int main ( int argc, char *argv[] ) {
// free up that particular pxml_handle within the return-list
// next
// free up that particular pxml_handle within the return-list
// next
- pxmlapps++;
- h = pxmlapps;
+ appiter++;
} // while
/* done!
*/
} // while
/* done!
*/
- pnd_pxml_delete ( pxmlapps );
return ( 0 );
}
return ( 0 );
}