MCPcopy Create free account
hub / github.com/Singular/Singular / heBrowserHelp

Function heBrowserHelp

Singular/fehelp.cc:769–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767STATIC_VAR BOOLEAN feHelpCalled = FALSE;
768
769static void heBrowserHelp(heEntry hentry)
770{
771 // check checksums of procs
772 int kchksum = (hentry != NULL && hentry->chksum > 0 ?
773 heKeyChksum(hentry->key) : 0);
774 if (kchksum && kchksum != hentry->chksum && heOnlineHelp(hentry->key))
775 return;
776
777 if (heCurrentHelpBrowser == NULL) feHelpBrowser(NULL, 0);
778 assume(heCurrentHelpBrowser != NULL);
779 if (! feHelpCalled)
780 {
781 Warn("Displaying help in browser '%s'.", heCurrentHelpBrowser->browser);
782 //if (strcmp(heCurrentHelpBrowser->browser, "netscape") == 0 &&
783 // feResource('h', 0) == NULL)
784 //{
785 // Warn("Using URL '%s'.", feResource('u', 0));
786 //}
787 WarnS("Use 'system(\"--browser\", <browser>);' to change browser,");
788 StringSetS("where <browser> can be: ");
789 int i = 0;
790 i = 0;
791 while (heHelpBrowsers[i].browser != NULL)
792 {
793 if (heHelpBrowsers[i].init_proc(0,i))
794 StringAppend("\"%s\", ", heHelpBrowsers[i].browser);
795 i++;
796 }
797 char *browsers=StringEndS();
798 if (browsers[strlen(browsers)-2] == ',')
799 {
800 browsers[strlen(browsers)-2] = '.';
801 browsers[strlen(browsers)-1] = '\0';
802 }
803 WarnS(browsers);
804 omFree(browsers);
805 }
806
807 heCurrentHelpBrowser->help_proc(hentry, heCurrentHelpBrowserIndex);
808 feHelpCalled = TRUE;
809}
810
811#define MAX_SYSCMD_LEN MAXPATHLEN*2
812static BOOLEAN heGenInit(int warn, int br)

Callers 1

feHelpFunction · 0.85

Calls 8

heKeyChksumFunction · 0.85
heOnlineHelpFunction · 0.85
feHelpBrowserFunction · 0.85
WarnFunction · 0.85
WarnSFunction · 0.85
StringSetSFunction · 0.85
StringAppendFunction · 0.85
StringEndSFunction · 0.85

Tested by

no test coverage detected