Changeset dcb1b7 in git
- Timestamp:
- Jul 27, 2005, 11:46:20 AM (18 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 48ce9a6586315bf81f1feb56a74edfe29d400294
- Parents:
- 0cbc03bb27f9fe962c2afb4faaaa825bdb7bed7c
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/feResource.cc
r0cbc03 rdcb1b7 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: feResource.cc,v 1. 6 2005-07-25 09:09:41 wienandExp $ */4 /* $Id: feResource.cc,v 1.7 2005-07-27 09:46:19 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: management of resources … … 38 38 #if defined(ix86_Win) && ! defined(__CYGWIN__) 39 39 #define SINGULAR_DEFAULT_DIR "/Singular/"S_VERSION1 40 #elif defined(macintosh)41 #define SINGULAR_DEFAULT_DIR "Macintosh HD:Singular:"S_VERSION142 40 #else // unix 43 41 #define SINGULAR_DEFAULT_DIR "/usr/local/Singular/"S_VERSION1 … … 95 93 {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "http://www.singular.uni-kl.de/Manual/"S_VERSION1, ""}, 96 94 {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", ""}, 97 //#if !defined(macintosh)98 // {"netscape", 'N', feResBinary,"NETSCAPE", "%b/netscape", ""},99 // {"info", 'I', feResBinary,"INFO", "%b/info", ""},100 // {"tkinfo", 'T', feResBinary,"TKINFO", "%b/tkinfo", ""},101 95 {"Path", 'p', feResPath, NULL, "%b;$PATH", ""}, 102 //#endif // ! defined(macintosh)103 96 104 97 #ifdef ESINGULAR … … 133 126 #if defined(ix86_Win) 134 127 ';' 135 #elif defined(macintosh)136 ','137 128 #else 138 129 ':' … … 418 409 return NULL; 419 410 } 420 #ifndef macintosh421 411 #ifdef ix86_Win // stupid WINNT sometimes gives you argv[0] within "" 422 412 if (*feArgv0 == '"') … … 446 436 } 447 437 return omStrDup(value); 448 #else // macintosh449 return feArgv0;450 #endif451 438 } 452 439 … … 554 541 } 555 542 556 #ifdef macintosh557 // replace / and .. by DIR_SEP and UP_DIR558 fn = fname;559 while (*fn != NULL)560 {561 if (*fn == '.' && *(fn + 1) == '.')562 {563 mystrcpy(fn , fn + 2);564 }565 else566 {567 if (*fn == '/') *fn = DIR_SEP;568 fn++;569 }570 }571 #endif572 573 543 #ifdef RESOURCE_DEBUG 574 544 printf("feCleanUpFile: leaving with =%s=\n", fname); -
kernel/febase.cc
r0cbc03 rdcb1b7 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.cc,v 1. 5 2005-07-26 17:04:15Singular Exp $ */4 /* $Id: febase.cc,v 1.6 2005-07-27 09:46:19 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: i/o system … … 38 38 /*0 implementation */ 39 39 40 char fe_promptstr[] 41 #ifdef macintosh 42 =" \n"; 43 #else 44 =" "; 45 #endif 40 char fe_promptstr[] =" "; 46 41 47 42 #define INITIAL_PRINT_BUFFER 24*1024 … … 51 46 int si_echo = 0; 52 47 int printlevel = 0; 53 #ifndef macintosh54 48 int pagelength = 24; 55 #else56 int pagelength = -1;57 #endif58 49 int colmax = 80; 59 50 char prompt_char = '>'; /*1 either '>' or '.'*/ … … 71 62 BOOLEAN feWarn = TRUE; 72 63 BOOLEAN feOut = TRUE; 73 74 #ifdef macintosh75 static int lines = 0;76 static int cols = 0;77 #endif78 64 79 65 const char feNotImplemented[]="not implemented"; … … 456 442 { 457 443 fe_promptstr[0]=prompt_char; 458 #ifdef macintosh459 cols = 0;460 printf(fe_promptstr);mflush();461 #endif462 444 } 463 445 … … 797 779 strcat(s, DIR_SEPP); 798 780 strcat(s, path); 799 #ifndef macintosh 800 if(!access(s, R_OK)) { found++; break; } 801 #else 802 f=fopen(s,mode); /* do not need myfopen: we test only the access */ 803 if (f!=NULL) { found++; fclose(f); break; } 804 #endif 781 if(!access(s, R_OK)) { found++; break; } 805 782 p = q+1; 806 783 } … … 1020 997 1021 998 1022 #ifdef macintosh1023 static int lines = 0;1024 static int cols = 0;1025 1026 void mwrite(uchar c)1027 {1028 if (c == '\n')1029 {1030 cols = 0;1031 if (lines == pagelength)1032 {1033 lines = 0;1034 fputs("pause>\n",stderr);1035 uchar c = fgetc(stdin);1036 }1037 else1038 {1039 lines++;1040 fePutChar(c);1041 }1042 }1043 else1044 {1045 fePutChar(c);1046 cols++;1047 if (cols == colmax)1048 {1049 // cols = 0; //will be done by mwrite('\n');1050 mwrite('\n');1051 }1052 }1053 }1054 #endif1055 1056 999 // some routines which redirect the output of print to a string 1057 1000 static char* sprint = NULL; … … 1100 1043 { 1101 1044 1102 #ifdef macintosh1103 char c;1104 while ('\0' != (c = *s++))1105 {1106 mwrite(c);1107 }1108 #else1109 1045 #ifdef HAVE_TCL 1110 1046 if (tclmode) … … 1122 1058 } 1123 1059 } 1124 #endif1125 1060 } 1126 1061 } … … 1166 1101 if(tclmode) 1167 1102 #endif 1168 #if (defined(HAVE_TCL) || defined(macintosh))1103 #if defined(HAVE_TCL) 1169 1104 { 1170 1105 char *s=(char *)omAlloc(strlen(fmt)+256); … … 1173 1108 PrintTCLS('N',s); 1174 1109 #endif 1175 #ifdef macintosh 1176 char c; 1177 while ('\0' != (c = *s++)) 1178 { 1179 mwrite(c); 1180 } 1181 if (feProt&PROT_O) 1182 { 1183 vfprintf(feProtFile,fmt,ap); 1184 } 1185 #endif 1186 } 1187 #endif 1188 #if !defined(macintosh) || defined(HAVE_TCL) 1110 } 1111 #endif 1189 1112 #ifdef HAVE_TCL 1190 1113 else 1191 #endif1192 1114 { 1193 1115 vfprintf(stdout, fmt, ap); -
kernel/febase.h
r0cbc03 rdcb1b7 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: febase.h,v 1. 3 2005-07-26 17:04:15Singular Exp $ */6 /* $Id: febase.h,v 1.4 2005-07-27 09:46:20 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: basic i/o … … 13 13 14 14 /* define DIR_SEPP, etc */ 15 #ifdef macintosh /* mac os 9 */ 16 # define DIR_SEP ':' 17 # define DIR_SEPP ":" 18 # define UP_DIR "" 19 #else /* unix , WINNT */ 15 /* unix , WINNT */ 20 16 # define DIR_SEP '/' 21 17 # define DIR_SEPP "/" 22 18 # define UP_DIR ".." 23 #endif /* macintosh */24 19 // this might still get reset by feInitResources 25 20 extern char fePathSep; -
kernel/ffields.cc
r0cbc03 rdcb1b7 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ffields.cc,v 1. 1.1.1 2003-10-06 12:15:52Singular Exp $ */4 /* $Id: ffields.cc,v 1.2 2005-07-27 09:46:20 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: finite fields with a none-prime number of elements (via tables) … … 618 618 else nfCharQ = -c; 619 619 char buf[100]; 620 #ifdef macintosh621 sprintf(buf,"gftables:%d",nfCharQ);622 #else623 620 sprintf(buf,"gftables/%d",nfCharQ); 624 #endif625 621 FILE * fp = feFopen(buf,"r",NULL,TRUE); 626 622 if (fp==NULL) -
kernel/misc.cc
r0cbc03 rdcb1b7 125 125 * 126 126 *#ifndef MSDOS 127 *#ifndef macintosh128 127 *#include <sys/times.h> 129 128 *#include <sys/resource.h> … … 136 135 * sleep(10); 137 136 *} 138 *#else139 *void very_nice(){}140 *#endif141 137 *#else 142 138 *void very_nice(){}
Note: See TracChangeset
for help on using the changeset viewer.