+ // base paths
+ p -> object_path = strdup ( fpath );
+
+ if ( ( fixpxml = strcasestr ( p -> object_path, PXML_FILENAME ) ) ) {
+ *fixpxml = '\0'; // if this is not a .pnd, lop off the PXML.xml at the end
+ } else if ( ( fixpxml = strrchr ( p -> object_path, '/' ) ) ) {
+ *(fixpxml+1) = '\0'; // for pnd, lop off to last /
+ }
+
+ if ( ( fixpxml = strrchr ( fpath, '/' ) ) ) {
+ p -> object_filename = strdup ( fixpxml + 1 );
+ }
+
+ // png icon path
+ p -> pnd_icon_pos = pxml_close_pos;
+
+ // type
+ p -> object_type = valid;
+
+ // PXML fields
+ if ( pnd_pxml_get_app_name_en ( pxmlh ) ) {
+ p -> title_en = strdup ( pnd_pxml_get_app_name_en ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_description_en ( pxmlh ) ) {
+ p -> desc_en = strdup ( pnd_pxml_get_description_en ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_icon ( pxmlh ) ) {
+ p -> icon = strdup ( pnd_pxml_get_icon ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_exec ( pxmlh ) ) {
+ p -> exec = strdup ( pnd_pxml_get_exec ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_exec_option_no_x11 ( pxmlh ) ) {
+ p -> option_no_x11 = strdup ( pnd_pxml_get_exec_option_no_x11 ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_unique_id ( pxmlh ) ) {
+ p -> unique_id = strdup ( pnd_pxml_get_unique_id ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_clockspeed ( pxmlh ) ) {
+ p -> clockspeed = strdup ( pnd_pxml_get_clockspeed ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_startdir ( pxmlh ) ) {
+ p -> startdir = strdup ( pnd_pxml_get_startdir ( pxmlh ) );
+ }
+ // category kruft
+ if ( pnd_pxml_get_main_category ( pxmlh ) ) {
+ p -> main_category = strdup ( pnd_pxml_get_main_category ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_subcategory1 ( pxmlh ) ) {
+ p -> main_category1 = strdup ( pnd_pxml_get_subcategory1 ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_subcategory2 ( pxmlh ) ) {
+ p -> main_category2 = strdup ( pnd_pxml_get_subcategory2 ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_altcategory ( pxmlh ) ) {
+ p -> alt_category = strdup ( pnd_pxml_get_altcategory ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_altsubcategory1 ( pxmlh ) ) {
+ p -> alt_category1 = strdup ( pnd_pxml_get_altsubcategory1 ( pxmlh ) );
+ }
+ if ( pnd_pxml_get_altsubcategory2 ( pxmlh ) ) {
+ p -> alt_category2 = strdup ( pnd_pxml_get_altsubcategory2 ( pxmlh ) );
+ }
+ // preview pics
+ if ( ( z = pnd_pxml_get_previewpic1 ( pxmlh ) ) ) {
+ p -> preview_pic1 = strdup ( z );
+ }
+ if ( ( z = pnd_pxml_get_previewpic2 ( pxmlh ) ) ) {
+ p -> preview_pic2 = strdup ( z );
+ }
+
+ } else {
+ //printf ( "Invalid PXML; skipping.\n" );