*** info.c.ship Mon Apr 30 18:35:36 2001 --- info.c Mon Apr 30 18:55:38 2001 *************** *** 48,53 **** --- 48,57 ---- non-zero. */ static char *index_search_string = (char *)NULL; + /* Non-zero means to just print out the active INFOPATH for this + session and quit. */ + static int *show_infopath_p = 0; + /* Non-zero means print version info only. */ static int print_version_p = 0; *************** *** 92,97 **** --- 96,102 ---- #define DRIBBLE_OPTION 2 #define RESTORE_OPTION 3 #define IDXSRCH_OPTION 4 + #define SHOPATH_OPTION 5 static struct option long_options[] = { { "apropos", 1, 0, APROPOS_OPTION }, { "directory", 1, 0, 'd' }, *************** *** 110,115 **** --- 115,121 ---- { "speech-friendly", 0, &speech_friendly, 1 }, #endif { "index-search", 1, 0, IDXSRCH_OPTION }, + { "show-infopath", 0, 0, SHOPATH_OPTION }, {NULL, 0, NULL, 0} }; *************** *** 244,249 **** --- 250,259 ---- index_search_string = xstrdup (optarg); break; + case SHOPATH_OPTION: + show_infopath_p = 1; + break; + default: fprintf (stderr, _("Try --help for more information.\n")); xexit (1); *************** *** 374,379 **** --- 384,395 ---- xexit (0); } + if (show_infopath_p) + { + puts (infopath); + xexit (0); + } + /* If there are arguments remaining, they are the names of menu items in sequential info files starting from the first one loaded. That file name is either "dir", or the contents of user_filename if one *************** *** 545,550 **** --- 561,567 ---- --show-options, --usage go to command-line options node.\n\ --subnodes recursively output menu items.\n%s\ --vi-keys use vi-like and less-like key bindings.\n\ + --show-infopath display the INFOPATH it will use and exit.\n\ --version display version information and exit.\n\ \n\ The first non-option argument, if present, is the menu entry to start from;\n\