Changeset ef0124 in git for Singular/fehelp.cc
- Timestamp:
- May 5, 2000, 8:40:34 PM (24 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- ba9453910d26fdb676fa083bc02d866111ea5ece
- Parents:
- f9bfec9b7263804ac776257b32087185168b1000
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/fehelp.cc
rf9bfec ref0124 23 23 #include "feOpt.h" 24 24 25 25 26 /***************************************************************** 26 27 * … … 64 65 // browser functions 65 66 static BOOLEAN heInfoInit(int); static void heInfoHelp(heEntry hentry); 66 #if ! defined( WINNT) && ! defined(macintosh)67 #if ! defined(macintosh) 67 68 static BOOLEAN heNetscapeInit(int);static void heNetscapeHelp(heEntry hentry); 68 69 static BOOLEAN heXinfoInit(int); static void heXinfoHelp(heEntry hentry); … … 73 74 static BOOLEAN heEmacsInit(int); static void heEmacsHelp(heEntry hentry); 74 75 76 #ifdef WINNT 77 static void heHtmlHelp(heEntry hentry); 78 extern "C" void heOpenWinntUrl(const char* url, int local); 79 #endif 80 75 81 static heBrowser heCurrentHelpBrowser = NULL; 76 82 … … 84 90 static heBrowser_s heHelpBrowsers[] = 85 91 { 86 #if ! defined(WINNT) && ! defined(macintosh) 92 #ifdef WINNT 93 { "html", heDummyInit, heHtmlHelp}, 94 #endif 95 #if ! defined(macintosh) 87 96 { "netscape", heNetscapeInit, heNetscapeHelp}, 88 97 { "tkinfo", heTkinfoInit, heTkinfoHelp}, … … 732 741 } 733 742 734 #if ! defined( WINNT) && ! defined(macintosh)743 #if ! defined(macintosh) 735 744 static BOOLEAN heNetscapeInit(int warn) 736 745 { … … 740 749 return FALSE; 741 750 } 751 #ifndef WINNT 742 752 if (getenv("DISPLAY") == NULL) 743 753 { … … 746 756 return FALSE; 747 757 } 748 758 #endif 749 759 750 760 if (feResource('h' /*"HtmlDir"*/, (feOptValue(FE_OPT_ALLOW_NET)? 0 : warn)) … … 787 797 sprintf(url, "%s%s/index.htm", urltype, htmldir); 788 798 } 799 #ifndef WINNT 789 800 sprintf(sys, "%s --remote 'OpenUrl(%s)' > /dev/null 2>&1", 801 #else 802 sprintf(sys, "%s %s", 803 #endif 790 804 feResource('N' /*"netscape"*/), url); 791 805 … … 805 819 } 806 820 821 #ifdef WINNT 822 static void heHtmlHelp(heEntry hentry) 823 { 824 char url[MAXPATHLEN]; 825 char* html_dir = feResource('h' /*"HtmlDir"*/); 826 sprintf(url, "%s/%s", 827 (html_dir != NULL ? html_dir : feResource('u' /*"ManualUrl"*/)), 828 (hentry!=NULL && *(hentry->url)!='\0' ? hentry->url : "index.htm")); 829 830 heOpenWinntUrl(url, (html_dir != NULL ? 1 : 0)); 831 } 832 #endif 833 807 834 static BOOLEAN heXinfoInit(int warn) 808 835 { 836 #ifndef WINNT 809 837 if (getenv("DISPLAY") == NULL) 810 838 { … … 813 841 return FALSE; 814 842 } 843 #endif 815 844 if (feResource('i', warn) == NULL) 816 845 { … … 834 863 char sys[MAX_SYSCMD_LEN]; 835 864 865 #ifdef WINNT 866 #define EXTRA_XTERM_ARGS "+vb -sb -fb Courier-bold-13 -tn linux -cr Red3" 867 #else 868 #define EXTRA_XTERM_ARGS "" 869 #endif 870 836 871 if (hentry != NULL && *(hentry->key) != '\0') 837 872 { 838 873 if (*(hentry->node) != '\0') 839 sprintf(sys, "%s -e %s -f %s --node='%s' &", 840 feResource('X'), feResource('I'), feResource('i'), hentry->node); 874 sprintf(sys, "%s %s -e %s -f %s --node='%s' &", 875 feResource('X'), EXTRA_XTERM_ARGS, 876 feResource('I'), feResource('i'), hentry->node); 841 877 else 842 sprintf(sys, "%s -e %s -f %s Index '%s' &", 843 feResource('X'), feResource('I'), feResource('i'), hentry->key); 878 sprintf(sys, "%s %s -e %s -f %s Index '%s' &", 879 feResource('X'), EXTRA_XTERM_ARGS, 880 feResource('I'), feResource('i'), hentry->key); 844 881 } 845 882 else 846 sprintf(sys, "%s -e %s -f %s --node=Top &", 847 feResource('X'), feResource('I'), feResource('i')); 883 sprintf(sys, "%s %s -e %s -f %s --node=Top &", 884 feResource('X'), EXTRA_XTERM_ARGS, 885 feResource('I'), feResource('i')); 848 886 system(sys); 849 887 } … … 851 889 static BOOLEAN heTkinfoInit(int warn) 852 890 { 891 #ifndef WINNT 853 892 if (getenv("DISPLAY") == NULL) 854 893 { … … 857 896 return FALSE; 858 897 } 898 #endif 859 899 if (feResource('i', warn) == NULL) 860 900 { … … 884 924 system(sys); 885 925 } 886 #endif // ! defined( WINNT) && ! defined(macintosh)926 #endif // ! defined(macintosh) 887 927 888 928 static BOOLEAN heDummyInit(int warn)
Note: See TracChangeset
for help on using the changeset viewer.