示例#1
0
文件: gram.c 项目: joequant/iraf
/* LISTALLHELP -- Starting at curpack, list out all packages and their tasks
 * in a circular fashion until get back to curpack. this is like the search
 * path works.  Label the current package in some way.  Serves ?? directive.
 * TODO: this should be optimized once a nice form is settled on.
 */
void 
listallhelp (int show_invis)
{
	register struct package *pkp;

	pkp = curpack;
	do {
		oprintf ("    %s:\n", pkp->pk_name);
		listhelp (pkp, show_invis);
		if ((pkp = pkp->pk_npk) == NULL)
			pkp = reference (package, pachead);
	} until (pkp == curpack);
}
示例#2
0
文件: history.c 项目: olebole/iraf
/* PPROMPT -- Print prompt as first two chars of prompt string plus "> ", i.e.,
 * "pk> ".  If null prompt string (NOCLOSURE), print the continuation prompt
 * ">>> ".  Also print, before the prompt, all ltasks in current package
 * if menus() are enabled and a new package has been invoked.
 */
void
pprompt (
  register char *string
)
{
	static	struct package *lastpack = NULL;

	if (menus() && curpack != lastpack) {
	    listhelp (curpack, NO);
	    lastpack = curpack;
	}

	printf ("%2.2s", string);
	printf ("> ");
	fflush (stdout);
}
示例#3
0
文件: help.c 项目: nssilva/basictest
void dohelp(bc *bc, char *p)
{
help *h;

	if(!*p)
		listhelp(bc, p);
	else
	{
		h=findhelp(p);
		if(h && h->name)
			tprintf(bc, "\n%s:\n\n%s\n", p, h->info);
		else
			tprintf(bc, "No help available on '%s'\n", p);
	}

}
示例#4
0
文件: history.c 项目: geechee/iraf
/* GET_PROMPT -- Get prompt as first two chars of prompt string plus "> ", i.e.,
 * "pk> ".  If null prompt string (NOCLOSURE), print the continuation prompt
 * ">>> ".  Also print, before the prompt, all ltasks in current package
 * if menus() are enabled and a new package has been invoked.
 */
void 
get_prompt (register char *string)
{
	static	struct package *lastpack = NULL;
	extern	long int run_level;

        if (menus() && curpack != lastpack) {
            listhelp (curpack, NO);
            lastpack = curpack;
	    printf ("\n");
	    fflush (stdout);
        }

	if (strncmp ("clpackage", string, 9) == 0)
	    strcpy (prompt, "ecl> ");
	else
	    sprintf (prompt,
		(eh_longprompt == YES) ? "%s> " : "%2.2s> ", string);

	run_level = 0;
}