Changeset 4e8195 in git
- Timestamp:
- Jul 20, 2005, 10:00:29 AM (18 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- cf2307dc9864719fabb9577ce88d785d229b1eea
- Parents:
- d3c2f999d4d790673490486a0f05709ba9720804
- Location:
- Singular
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/Makefile.in
rd3c2f9 r4e8195 75 75 LIBS = -lm @NEED_LIBS@ 76 76 else 77 LIBS = -lsingfac -lsingcf -lntl -static -lreadline - Xlinker -Bdynamic -lgmp -lcygncurses677 LIBS = -lsingfac -lsingcf -lntl -static -lreadline -lhtmlhelp -Xlinker -Bdynamic -lgmp -lcygncurses6 78 78 endif 79 79 MP_LIBS = @MP_LIBS@ -
Singular/fehelp.cc
rd3c2f9 r4e8195 4 4 /* 5 5 * ABSTRACT: help system 6 * versin $Id: fehelp.cc,v 1.4 3 2005-05-06 10:08:43 SingularExp $6 * versin $Id: fehelp.cc,v 1.44 2005-07-20 08:00:28 wienand Exp $ 7 7 */ 8 8 … … 75 75 static void heHtmlHelp(heEntry hentry,int); 76 76 static void heWinHelp(heEntry hentry,int); 77 static void heWinHtmlHelp(heEntry hentry,int); 77 78 #include "sing_win.h" 78 79 #endif … … 206 207 } 207 208 fseek(f,0,SEEK_SET); 209 #ifdef ix86_Win 210 // for the 6(!) default browsers 211 heHelpBrowsers=(heBrowser_s*)omAlloc0((br+7)*sizeof(heBrowser_s)); 212 #else 208 213 // for the 4(!) default browsers 209 214 heHelpBrowsers=(heBrowser_s*)omAlloc0((br+4)*sizeof(heBrowser_s)); 215 #endif 210 216 br=0; 211 217 while (fgets( buf, sizeof(buf), f)) … … 232 238 { 233 239 #ifdef ix86_Win 234 // for the 6(!) default browsers235 heHelpBrowsers=(heBrowser_s*)omAlloc0( 6*sizeof(heBrowser_s));240 // for the 7(!) default browsers 241 heHelpBrowsers=(heBrowser_s*)omAlloc0(7*sizeof(heBrowser_s)); 236 242 #else 237 243 // for the 4(!) default browsers … … 240 246 } 241 247 #ifdef ix86_Win 248 heHelpBrowsers[br].browser="htmlhelp"; 249 heHelpBrowsers[br].init_proc=heGenInit; 250 heHelpBrowsers[br].help_proc=heWinHtmlHelp; 251 heHelpBrowsers[br].required="h"; 252 heHelpBrowsers[br].action=NULL; 253 br++; 242 254 heHelpBrowsers[br].browser="winhlp"; 243 255 heHelpBrowsers[br].init_proc=heGenInit; 244 256 heHelpBrowsers[br].help_proc=heWinHelp; 245 257 heHelpBrowsers[br].required="h"; 246 //heHelpBrowsers[br].action=NULL;258 heHelpBrowsers[br].action=NULL; 247 259 br++; 248 260 heHelpBrowsers[br].browser="html"; … … 250 262 heHelpBrowsers[br].help_proc=heHtmlHelp; 251 263 heHelpBrowsers[br].required="h"; 252 //heHelpBrowsers[br].action=NULL;264 heHelpBrowsers[br].action=NULL; 253 265 br++; 254 266 #endif … … 257 269 heHelpBrowsers[br].help_proc=heBuiltinHelp; 258 270 heHelpBrowsers[br].required="i"; 259 //heHelpBrowsers[br].action=NULL;271 heHelpBrowsers[br].action=NULL; 260 272 br++; 261 273 heHelpBrowsers[br].browser="dummy"; 262 274 heHelpBrowsers[br].init_proc=heDummyInit; 263 275 heHelpBrowsers[br].help_proc=heDummyHelp; 264 //heHelpBrowsers[br].required=NULL;265 //heHelpBrowsers[br].action=NULL;276 heHelpBrowsers[br].required=NULL; 277 heHelpBrowsers[br].action=NULL; 266 278 br++; 267 279 heHelpBrowsers[br].browser="emacs"; 268 280 heHelpBrowsers[br].init_proc=heEmacsInit; 269 281 heHelpBrowsers[br].help_proc=heEmacsHelp; 270 //heHelpBrowsers[br].required=NULL;271 //heHelpBrowsers[br].action=NULL;272 //br++;273 //heHelpBrowsers[br].browser=NULL;274 //heHelpBrowsers[br].init_proc=NULL;275 //heHelpBrowsers[br].help_proc=NULL;276 //heHelpBrowsers[br].required=NULL;277 //heHelpBrowsers[br].action=NULL;282 heHelpBrowsers[br].required=NULL; 283 heHelpBrowsers[br].action=NULL; 284 br++; 285 heHelpBrowsers[br].browser=NULL; 286 heHelpBrowsers[br].init_proc=NULL; 287 heHelpBrowsers[br].help_proc=NULL; 288 heHelpBrowsers[br].required=NULL; 289 heHelpBrowsers[br].action=NULL; 278 290 } 279 291 … … 701 713 hePrintHelpStr(hh,s_help,s); 702 714 } 703 else Print("package %s not found\n",s); 715 else Print("package %s not found\n",s); 704 716 } 705 717 return FALSE; … … 901 913 return TRUE; 902 914 } 915 903 916 #ifdef ix86_Win 917 904 918 static void heHtmlHelp(heEntry hentry, int br) 905 919 { … … 911 925 912 926 heOpenWinntUrl(url, (html_dir != NULL ? 1 : 0)); 927 } 928 929 static void heWinHtmlHelp(heEntry hentry, int br) 930 // Function to call the Microsoft HTML Help System 931 // Uses API Call Function in sing_win.cc 932 { 933 char keyw[MAX_HE_ENTRY_LENGTH]; 934 if ((hentry!=NULL)&&(hentry->key!=NULL)) 935 strcpy(keyw,hentry->key); 936 else 937 strcpy(keyw," "); 938 char* helppath = feResource('h' /*"HtmlDir"*/); 939 const char *filename="/Manual.chm"; 940 int helppath_len=0; 941 if (helppath!=NULL) helppath_len=strlen(helppath); 942 char *callpath=(char *)omAlloc0(helppath_len+strlen(filename)+1); 943 if ((helppath!=NULL) && (*helppath>' ')) 944 strcpy(callpath,helppath); 945 strcat(callpath,filename); 946 heOpenWinHtmlHelp(keyw,callpath); 947 omfree(callpath); 913 948 } 914 949 -
Singular/sing_win.cc
rd3c2f9 r4e8195 3 3 #include <windows.h> 4 4 #include <winuser.h> 5 #include <htmlhelp.h> 5 6 #include <sys/cygwin.h> 6 7 #include <stdio.h> … … 8 9 #define MAXPATHLEN 1024 9 10 #endif 11 12 void heOpenWinHtmlHelp(const char* keyw, char* helppath ) 13 // API Call Sequence for Microsoft HTML Help System 14 { 15 char path[MAXPATHLEN]; 16 #ifdef TEST 17 printf("keyw:%s\n", keyw); 18 #endif 19 cygwin_conv_to_full_win32_path(helppath, path); 20 #ifdef TEST 21 printf("path:%s\n", path); 22 #endif 23 HH_AKLINK link; 24 link.cbStruct = sizeof(HH_AKLINK) ; 25 link.fReserved = FALSE ; 26 link.pszKeywords = keyw; 27 link.pszUrl = NULL ; 28 link.pszMsgText = NULL ; 29 link.pszMsgTitle = NULL ; 30 link.pszWindow = NULL ; 31 link.fIndexOnFail = TRUE ; 32 HtmlHelp(NULL, "..\\html\\Manual.chm", HH_KEYWORD_LOOKUP, (DWORD)&link); 33 } 10 34 11 35 void heOpenWinntHlp(const char* keyw, char* helppath ) -
Singular/sing_win.h
rd3c2f9 r4e8195 4 4 #ifdef ix86_Win 5 5 6 void heOpenWinHtmlHelp(const char* keyw, char* helppath ); 6 7 void heOpenWinntHlp(const char* keyw, char* helppath ); 7 8 void heOpenWinntUrl(const char* url, int local);
Note: See TracChangeset
for help on using the changeset viewer.