73 sprintf(
normalBuf,
"%c[0m%c[37m", 0x1b, 0x1b);
79 for(i=0;p->
cmd;i++,p++)
123 for(i=0;i<26;i++,p++)
129 st_report(
"No help for the letter %1.1s", h);
133 st_report(
"There are %d commands starting with %1.1s", p->
n, h);
139 if(k == 7 || k == 15 || k == 23 || k == 31)
145 if(k != 8 && k != 16 && k != 24 && k != 32)
154 st_report(
"No help for the letter %1.1s", h);
164 st_warn(
"Ambiguous Command: Possible Commands:\n\n %s", help);
176 sprintf(sysbuf,
"less -e %s/linuxpops/%s.hlp",
help_home, buf);
190 char *mStrs[] = {
"A",
"C",
"S",
"O",
"?" };
195 st_print(
"Command Args Mode nArgs Help\n");
199 for(i=0;p->
cmd;i++,p++)
209 if(
getYesNoQuit(
"\nHit 'Return' to continue; 'q' to quit help") == 2)
238 int i, j=0, hi, wd,
first=1;
239 char *mStrs[] = {
"A",
"C",
"S",
"O",
"?" };
256 for(i=0;p->
cmd;i++,p++)
266 if(
getYesNoQuit(
"\nHit 'Return' to continue; 'q' to quit help") == 2)
273 if(strcasestr(p->
help, hstr))
278 st_print(
"Command Args Mode nArgs Help\n");
302 st_print(
"No commands matching %s\n", hstr);
345 char tbuf[256], fname[5122], *string, line[512];
351 sprintf(fname,
"%s/supplemental/%s.sup",
help_home, tbuf);
355 if((sfp = fopen(fname,
"r") ) <= (FILE *)0)
362 while((
string = fgets(line,
sizeof(line), sfp)) != NULL)
364 fprintf(fp,
"%s", line);
376 char tbuf[256], fname[512], *user;
380 user = getenv(
"USER");
382 if(
strcmp(user,
"tfolkers"))
402 strcpy(tbuf, p->
cmd);
405 sprintf(fname,
"%s/linuxpops/%s.hlp",
help_home, tbuf);
407 if((fp = fopen(fname,
"w")) == NULL)
409 fprintf(stderr,
"Unable to open %s\n", fname);
444 if(!strncmp(p->
cmd, tbuf, len))
446 st_print(
"********************************************************************************\n");
453 if(strstr(cp,
"CAUTION"))
463 st_print(
"********************************************************************************\n");
469 st_fail(
"No /h help for cmd: %s", tbuf);
481 sprintf(sysbuf,
"okular %s/docs/LP_Changes.pdf 1> /dev/null 2>&1 &",
pkg_home);
char * strcmprs(char *str)
struct PARSE_STACK * args
struct COMMANDS commands[]
int printH_FlagHelp(char *cmd)
int showPartHelp(char *help)
int addSupplemental(char *cmd, FILE *fp)
char * help[MAX_HELP_STRINGS]
struct HELP_H_FLAG help_h_flag[]
struct HELP_STRUCT letter_help
int showSpecHelp(char *buf)
int getTerminalSize(int *cols, int *rows)
struct HELP_COMMANDS commands[MAX_LETTERS]