Changeset ef0124 in git for Singular/fehelp.cc


Ignore:
Timestamp:
May 5, 2000, 8:40:34 PM (24 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
ba9453910d26fdb676fa083bc02d866111ea5ece
Parents:
f9bfec9b7263804ac776257b32087185168b1000
Message:
*** empty log message ***


git-svn-id: file:///usr/local/Singular/svn/trunk@4290 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/fehelp.cc

    rf9bfec ref0124  
    2323#include "feOpt.h"
    2424
     25
    2526/*****************************************************************
    2627 *
     
    6465// browser functions
    6566static BOOLEAN heInfoInit(int);    static void heInfoHelp(heEntry hentry);
    66 #if ! defined(WINNT) && ! defined(macintosh)
     67#if ! defined(macintosh)
    6768static BOOLEAN heNetscapeInit(int);static void heNetscapeHelp(heEntry hentry);
    6869static BOOLEAN heXinfoInit(int);   static void heXinfoHelp(heEntry hentry);
     
    7374static BOOLEAN heEmacsInit(int);   static void heEmacsHelp(heEntry hentry);
    7475
     76#ifdef WINNT
     77static void heHtmlHelp(heEntry hentry);
     78extern "C" void heOpenWinntUrl(const char* url, int local);
     79#endif
     80
    7581static heBrowser heCurrentHelpBrowser = NULL;
    7682
     
    8490static heBrowser_s heHelpBrowsers[] =
    8591{
    86 #if ! defined(WINNT) && ! defined(macintosh)
     92#ifdef WINNT
     93  { "html",     heDummyInit,    heHtmlHelp},
     94#endif
     95#if ! defined(macintosh)
    8796  { "netscape", heNetscapeInit, heNetscapeHelp},
    8897  { "tkinfo",   heTkinfoInit,   heTkinfoHelp},
     
    732741}
    733742
    734 #if ! defined(WINNT) && ! defined(macintosh)
     743#if ! defined(macintosh)
    735744static BOOLEAN heNetscapeInit(int warn)
    736745{
     
    740749    return FALSE;
    741750  }
     751#ifndef WINNT
    742752  if (getenv("DISPLAY") == NULL)
    743753  {
     
    746756    return FALSE;
    747757  }
    748 
     758#endif
    749759 
    750760  if (feResource('h' /*"HtmlDir"*/, (feOptValue(FE_OPT_ALLOW_NET)? 0 : warn))
     
    787797    sprintf(url, "%s%s/index.htm", urltype, htmldir);
    788798  }
     799#ifndef WINNT
    789800  sprintf(sys, "%s --remote 'OpenUrl(%s)' > /dev/null 2>&1",
     801#else
     802  sprintf(sys, "%s %s",
     803#endif
    790804          feResource('N' /*"netscape"*/), url);
    791805
     
    805819}
    806820
     821#ifdef WINNT
     822static 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
    807834static BOOLEAN heXinfoInit(int warn)
    808835{
     836#ifndef WINNT
    809837  if (getenv("DISPLAY") == NULL)
    810838  {
     
    813841    return FALSE;
    814842  }
     843#endif
    815844  if (feResource('i', warn) == NULL)
    816845  {
     
    834863  char sys[MAX_SYSCMD_LEN];
    835864
     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
    836871  if (hentry != NULL && *(hentry->key) != '\0')
    837872  {
    838873    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);
    841877    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);
    844881  }
    845882  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'));
    848886  system(sys);
    849887}
     
    851889static BOOLEAN heTkinfoInit(int warn)
    852890{
     891#ifndef WINNT
    853892  if (getenv("DISPLAY") == NULL)
    854893  {
     
    857896    return FALSE;
    858897  }
     898#endif
    859899  if (feResource('i', warn) == NULL)
    860900  {
     
    884924  system(sys);
    885925}
    886 #endif // ! defined(WINNT) && ! defined(macintosh)
     926#endif // ! defined(macintosh)
    887927
    888928static BOOLEAN heDummyInit(int warn)
Note: See TracChangeset for help on using the changeset viewer.