29#define MAX_HE_ENTRY_LENGTH 160
144 Warn(
"No help for topic '%s' (not even for '*%s*')", str, str);
145 WarnS(
"Try '?;' for general help");
146 WarnS(
"or '?Index;' for all available help topics.");
159 Warn(
"No unique help for '%s'", str);
161 Warn(
"No help for topic '%s'", str);
186 if ((
buf[0]!=
'#') && (
buf[0]>
' '))
br++;
194 if ((
buf[0]!=
'#') && (
buf[0]>
' '))
201 while ((cmd[0]!=
'\0') && (cmd[
strlen(cmd)-1]<=
' '))
213 Print(
"syntax error in help.cnf, at line starting with %s\n",
buf);
368 while ((*
s <=
' ') && (*
s !=
'\0'))
s++;
369 if (*
s ==
'\0')
return NULL;
371 while (*
ss!=
'\0')
ss++;
373 while ((*
ss <=
' ') && (*
ss !=
'\0'))
378 if (*
ss ==
'\0')
return NULL;
409 while (
getc(
fd) !=
'\n') {};
428 while ((c =
getc(
fd)) !=
'\t' && c !=
EOF)
434 if (
hentry->node[0]==
'\0')
440 while ((c =
getc(
fd)) !=
'\t' && c !=
EOF)
482 if (
s ==
NULL || *
s ==
'\0')
489 char *
l, *r, *
ll, *
rr;
496 if (*
s >=
'A' && *
s <=
'Z')
ls[
i] = *
s + (
'a' -
'A');
500 }
while (*
s !=
'\0');
508 if (*
re >=
'A' && *
re <=
'Z')
rs[
i]= *
re + (
'a' -
'A');
512 }
while (*
re !=
'\0');
517 while (*r !=
'*' && *r !=
'\0' && *
l !=
'\0')
519 if (*r != *
l)
return FALSE;
525 if (*r ==
'\0')
return (*
l ==
'\0');
526 if (*r ==
'*' && r[1] ==
'\0')
return TRUE;
527 if (*
l ==
'\0')
return FALSE;
531 while (*
rr !=
'*' && *
rr !=
'\0' && *
ll !=
'\0')
539 if (*
rr ==
'\0')
return (*
ll ==
'\0');
540 if (*
rr ==
'*' &&
rr[-1] ==
'\0')
return TRUE;
549 while (*
rr !=
'*' && *
rr !=
'\0')
rr++;
574 if (filename ==
NULL || key ==
NULL)
return 0;
616 Print(
"`%s` not found in package %s\n",
id,
pa);
633 Print(
"help for %s from package %s\n",
ss,
s);
641 else Print(
"package %s not found\n",
s);
682 if (
s[
ls - 4] ==
'.') str =
s;
697 if ((str[1]!=
'\0') &&
712 Warn(
"library %s has an old format. Please fix it for the next time",
724 if (!
found)
WarnS(
"no help part in library found");
751 if (key ==
NULL || *key ==
'\0')
return 0;
756 if (
pi !=
NULL)
return pi->data.s.help_chksum;
787 WarnS(
"Use 'system(\"--browser\", <browser>);' to change browser,");
811#define MAX_SYSCMD_LEN MAXPATHLEN*2
827 if (
warn)
Warn(
"resource `%c` not found",*
p);
834 if (
warn)
WarnS(
"resource `D` not found");
847 while (((*
p==
':')||(*
p<=
' ')) && (*
p!=
'\0'))
p++;
848 while((
i<127) && (*
p>
' ') && (*
p!=
':'))
863 default:
Warn(
"unknown char %c",*
p);
897 #ifdef HAVE_VSNPRINTF
961 WarnS(
"singular.info not found");
1003 if (err!=0)
Warn(
"exit code: %d\n",err);
1013 WerrorS(
"No functioning help browser available.");
1022 WarnS(
"Your help command could not be executed. Use");
1025 WarnS(
"to enter the Singular online help. For general");
1026 WarnS(
"information on Singular running under Emacs, type C-h m.");
1043#define FIN_INDEX '\037'
1044#define HELP_NOT_OPEN 1
1045#define HELP_NOT_FOUND 2
1051 if ((
'A'<=
p)&&(
p<=
'Z'))
return p | 040;
1072 printf(
"\n Press <RETURN> to continue or x to exit help.\n");
1085 printf(
"\nEnd of part. Press <RETURN> to continue or x to exit help.\n");
1104 Print(
"HELP >>%s>>\n",str);
1118 while ((
p != str) && (*
p<=
' '));
1134 #ifdef HAVE_VSNPRINTF
1177 Warn(
"`%s` not found",String);
static BOOLEAN pa(leftv res, leftv args)
const CanonicalForm int s
char name(const Variable &v)
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
void WerrorS(const char *s)
static void * feOptValue(feOptIndex opt)
EXTERN_VAR struct fe_option feOptSpec[]
static char * feResource(feResourceConfig config, int warn)
static BOOLEAN heDummyInit(int, int)
static void feBrowserFile()
static int show(unsigned long offset, char *close)
void feStringAppendBrowsers(int warn)
EXTERN_VAR BOOLEAN FE_OPT_NO_SHELL_FLAG
static void hePrintHelpStr(const idhdl hh, const char *id, const char *pa)
static BOOLEAN heGenInit(int, int)
static BOOLEAN heEmacsInit(int, int)
STATIC_VAR heBrowser_s * heHelpBrowsers
static char * strclean(char *str)
heBrowserInitProc init_proc
static void heBrowserHelp(heEntry hentry)
BOOLEAN(* heBrowserInitProc)(int warn, int br)
static int heReKey2Entry(char *filename, char *key, heEntry hentry)
heBrowserHelpProc help_proc
static void heDummyHelp(heEntry hentry, int)
STATIC_VAR heBrowser heCurrentHelpBrowser
static int singular_manual(char *str, BOOLEAN isIndexEntry, heEntry hentry)
STATIC_VAR BOOLEAN feHelpCalled
#define MAX_HE_ENTRY_LENGTH
static void heEmacsHelp(heEntry hentry, int)
static void heBuiltinHelp(heEntry hentry, int)
static BOOLEAN heKey2Entry(char *filename, char *key, heEntry hentry)
static long heKeyChksum(char *key)
const char * feHelpBrowser(char *which, int warn)
STATIC_VAR int heCurrentHelpBrowserIndex
static void heGenHelp(heEntry hentry, int)
static BOOLEAN strmatch(char *s, char *re)
static char tolow(char p)
void(* heBrowserHelpProc)(heEntry hentry, int br)
static BOOLEAN heOnlineHelp(char *s)
idhdl ggetid(const char *n)
BOOLEAN iiLocateLib(const char *lib, char *where)
char * iiGetLibProcBuffer(procinfo *pi, int part)
static char * iiGetLibName(const procinfov pi)
find the library of an proc
VAR char libnamebuf[1024]
int yylplex(const char *libname, const char *libfile, lib_style_types *lib_style, idhdl pl, BOOLEAN autoexport=FALSE, lp_modes=LOAD_LIB)
char * omFindExec(const char *name, char *exec)
static int index(p_Length length, p_Ord ord)
void StringSetS(const char *st)
void StringAppendS(const char *st)
void PrintS(const char *s)
void Werror(const char *fmt,...)
EXTERN_VAR int pagelength
int status int void * buf