Changeset e6af18 in git
- Timestamp:
- Jul 23, 2013, 11:01:38 AM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 71a263848349882522f62f6c6369df2489d587d6
- Parents:
- f052a168e8609d4cc9eec8ff570e13cf79d60b7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/fehelp.cc
rf052a1 re6af18 99 99 * 100 100 *****************************************************************/ 101 // order is imp rotant -- first possible help is choosen101 // order is important -- first possible help is chosen 102 102 // moved to LIB/help.cnf 103 103 static heBrowser_s *heHelpBrowsers=NULL; … … 117 117 118 118 BOOLEAN key_is_regexp = (strchr(str, '*') != NULL); 119 120 // try proc help and library help 121 if (! key_is_regexp && heOnlineHelp(str)) return; 122 119 123 heEntry_s hentry; 120 124 memset(&hentry,0,sizeof(hentry)); … … 127 131 return; 128 132 } 129 130 // try proc help and library help131 if (! key_is_regexp && heOnlineHelp(str)) return;132 133 133 134 // Try to match approximately with key in index file … … 191 192 char *matches=StringEndS(); 192 193 PrintS(matches); 194 omFree(matches); 193 195 PrintLn(); 194 omFree(matches);195 196 return; 196 197 } … … 687 688 static BOOLEAN heOnlineHelp(char* s) 688 689 { 689 idhdl h=IDROOT->get(s,myynest);690 690 char *ss; 691 691 idhdl h; 692 693 if ((ss=strstr(s,"::"))!=NULL) 694 { 695 *ss='\0'; 696 ss+=2; 697 h=ggetid(s); 698 if (h!=NULL) 699 { 700 Print("help for %s from package %s\n",ss,s); 701 char s_help[200]; 702 strcpy(s_help,ss); 703 strcat(s_help,"_help"); 704 idhdl hh=IDPACKAGE(h)->idroot->get(s_help,0); 705 hePrintHelpStr(hh,s_help,s); 706 return TRUE; 707 } 708 else Print("package %s not found\n",s); 709 return TRUE; /* do not search the manual */ 710 } 711 h=IDROOT->get(s,myynest); 692 712 // try help for a procedure 693 713 if (h!=NULL) … … 707 727 return TRUE; 708 728 } 709 else710 {711 char s_help[200];712 strcpy(s_help,s);713 strcat(s_help,"_help");714 idhdl hh=IDROOT->get(s_help,0);715 hePrintHelpStr(hh,s_help,"Top");716 }717 729 } 718 730 else if (IDTYP(h)==PACKAGE_CMD) … … 720 732 idhdl hh=IDPACKAGE(h)->idroot->get("info",0); 721 733 hePrintHelpStr(hh,"info",s); 722 } 723 else if ((ss=strstr(s,"::"))!=NULL) 724 { 725 *ss='\0'; 726 ss+=2; 727 h=ggetid(s); 728 if (h!=NULL) 729 { 730 Print("help for %s from package %s\n",ss,s); 731 char s_help[200]; 732 strcpy(s_help,ss); 733 strcat(s_help,"_help"); 734 idhdl hh=IDPACKAGE(h)->idroot->get(s_help,0); 735 hePrintHelpStr(hh,s_help,s); 736 } 737 else Print("package %s not found\n",s); 734 return TRUE; 738 735 } 739 736 return FALSE; … … 892 889 if (feResource(*p, warn) == NULL) 893 890 { 894 if (warn) Warn("res source `%c` not found",*p);891 if (warn) Warn("resource `%c` not found",*p); 895 892 return FALSE; 896 893 } … … 899 896 if (getenv("DISPLAY") == NULL) 900 897 { 901 if (warn) WarnS("res source `D` not found");898 if (warn) WarnS("resource `D` not found"); 902 899 return FALSE; 903 900 } … … 984 981 { 985 982 char sys[MAX_SYSCMD_LEN]; 986 // char url[MAXPATHLEN];987 983 const char *p=heHelpBrowsers[br].action; 988 984 if (p==NULL) {PrintS("no action ?\n"); return;} … … 1067 1063 } 1068 1064 Print("running `%s`\n",sys); 1069 /*int dummy=*/(void) system(sys);1065 (void) system(sys); 1070 1066 } 1071 1067
Note: See TracChangeset
for help on using the changeset viewer.