+// 'backup' is currently 'X', for going back up in a folder/subcat without having to hit exec on the '..' entry
+void ui_push_backup ( void ) {
+
+ // a subcat-as-dir, or a dir browser?
+ if ( g_categories [ ui_category] -> fspath ) {
+ // dir browser, just climb our way back up
+
+ // go up
+ char *c;
+
+ // lop off last word; if the thing ends with /, lop that one, then the next word.
+ while ( ( c = strrchr ( g_categories [ ui_category] -> fspath, '/' ) ) ) {
+ *c = '\0'; // lop off the last hunk
+ if ( *(c+1) != '\0' ) {
+ break;
+ }
+ } // while
+
+ // nothing left?
+ if ( g_categories [ ui_category] -> fspath [ 0 ] == '\0' ) {
+ free ( g_categories [ ui_category] -> fspath );
+ g_categories [ ui_category] -> fspath = strdup ( "/" );
+ }
+
+ } else {
+ // a pnd subcat .. are we in one, or at the 'top'?
+ char *pcatname = g_categories [ ui_category ] -> parent_catname;
+
+ if ( ! pcatname ) {
+ return; // we're at the 'top' already
+ }
+
+ // set to first cat!
+ ui_category = 0;
+ // republish cats .. shoudl just be the one
+ category_publish ( CFNORMAL, NULL );
+
+ if ( pcatname ) {
+ ui_category = category_index ( pcatname );
+ }
+
+ } // dir or subcat?
+
+ return;
+}
+