Changeset 6123fa2 in git
- Timestamp:
- Sep 21, 1999, 4:44:59 PM (24 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- e874ad4d87f4276d7b99b274b118e8d6d8e6280c
- Parents:
- 9f8d5d3ce9044926152c6915b3b05def5c0129a8
- Location:
- Singular
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/feOpt.cc
r9f8d5d r6123fa2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: feOpt.cc,v 1. 2 1999-09-21 12:03:06obachman Exp $ */4 /* $Id: feOpt.cc,v 1.3 1999-09-21 14:44:57 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: Implementation of option buisness … … 116 116 #endif 117 117 118 {"allow-net", no_argument, 0, LONG_OPTION_RETURN, 119 0, "Allow to fetch (html) help pages from the net", feOptBool, 0, 0}, 120 118 121 {"browser", required_argument, 0, LONG_OPTION_RETURN, 119 122 "BROWSER", "Display help in BROWSER ([x,tk]info, netscape)", feOptString, 0, 0}, … … 128 131 129 132 {"no-rc", no_argument, 0, LONG_OPTION_RETURN, 130 0, "Do not execute `.singularrc' file on start-up",feOptBool, 0, 0},133 0, "Do not execute `.singularrc' file(s) on start-up", feOptBool, 0, 0}, 131 134 132 135 {"no-warn", no_argument, 0, LONG_OPTION_RETURN, … … 412 415 413 416 case FE_OPT_BROWSER: 414 feHelpBrowser( feOptSpec[FE_OPT_BROWSER].value, 1);417 feHelpBrowser((char*) feOptSpec[FE_OPT_BROWSER].value, 1); 415 418 416 419 case FE_OPT_TICKS_PER_SEC: -
Singular/febase.cc
r9f8d5d r6123fa2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.cc,v 1.8 2 1999-09-20 18:03:46obachman Exp $ */4 /* $Id: febase.cc,v 1.83 1999-09-21 14:44:58 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: i/o system … … 96 96 *****************************************************************/ 97 97 98 FILE * feFopen(char *path, char *mode, char *where,int useWerror) 98 FILE * feFopen(char *path, char *mode, char *where,int useWerror, 99 int path_only) 99 100 { 100 101 char longpath[MAXPATHLEN]; … … 109 110 } 110 111 } 111 FILE * f=myfopen(path,mode); 112 FILE * f=NULL; 113 if (! path_only) 114 f = myfopen(path,mode); 112 115 if (where!=NULL) strcpy(where,path); 113 if ((*mode=='r') && (path[0]!=DIR_SEP)&&(path[0]!='.') 114 &&(f==NULL)) 116 if ((*mode=='r') && 117 (path[0]!=DIR_SEP) && 118 ! (path[0] == '.' && path[1] == DIR_SEP) && 119 (f==NULL)) 115 120 { 116 121 char found = 0; … … 604 609 #ifndef unix 605 610 // Make sure that mode contains binary option 606 FILE *myfopen(char *path, char *mode)611 FILE* myfopen(char *path, char *mode) 607 612 { 608 613 char mmode[4]; -
Singular/febase.h
r9f8d5d r6123fa2 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: febase.h,v 1.3 7 1999-09-20 18:03:47obachman Exp $ */6 /* $Id: febase.h,v 1.38 1999-09-21 14:44:58 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT: basic i/o … … 170 170 * 171 171 *****************************************************************/ 172 FILE * feFopen(char *path, char *mode, char *where=NULL, int useWerror=FALSE); 172 FILE * feFopen(char *path, char *mode, char *where=NULL, int useWerror=FALSE, 173 int path_only=FALSE); 174 173 175 #ifndef __MWERKS__ 174 176 #ifdef HAVE_TCL -
Singular/fehelp.cc
r9f8d5d r6123fa2 741 741 { 742 742 if (warn) WarnS("no local HtmlDir found"); 743 return FALSE; 744 // if (warn) Warn("using %s instead", feResource('u' /*"ManualUrl"*/, warn)); 743 if (feOptValue(FE_OPT_ALLOW_NET)) 744 { 745 if (warn) Warn("using URL %s instead", feResource('u' /*"ManualUrl"*/, warn)); 746 } 747 else 748 return FALSE; 745 749 } 746 750 return TRUE; 747 751 } 752 748 753 static void heNetscapeHelp(heEntry hentry) 749 754 { -
Singular/tesths.cc
r9f8d5d r6123fa2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: tesths.cc,v 1.7 2 1999-09-21 12:03:07obachman Exp $ */4 /* $Id: tesths.cc,v 1.73 1999-09-21 14:44:59 obachman Exp $ */ 5 5 6 6 /* … … 176 176 newBuffer(mstrdup((char*) feOptValue(FE_OPT_EXECUTE)), BT_execute); 177 177 178 // first thing, however, is to load .singularrc 178 // first thing, however, is to load .singularrc from Singularpath 179 // and cwd/$HOME (in that order). 179 180 if (! feOptValue(FE_OPT_NO_RC)) 180 181 { 182 char buf[MAXPATHLEN]; 181 183 FILE * rc=myfopen(".singularrc","r"); 182 184 if (rc!=NULL) … … 187 189 else 188 190 { 189 char buf[MAXPATHLEN];190 191 char *home = getenv("HOME"); 191 192 if (home != NULL) … … 201 202 } 202 203 } 204 // 205 FILE *fd = feFopen(".singularrc", "r", buf, FALSE, TRUE); 206 if (fd != NULL) 207 { 208 fclose(fd); 209 newFile(buf); 210 } 203 211 } 204 212
Note: See TracChangeset
for help on using the changeset viewer.