Changeset e314db in git
- Timestamp:
- Mar 4, 2016, 11:08:31 AM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- fb24e814923417fdd0141344e491a098207148f9
- Parents:
- 93e3ef8d65a31285cdb950111efb60f28f8998a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/omFindExec.c
r93e3ef re314db 39 39 char *search; 40 40 char *p; 41 #ifdef WINNT42 char *extra = NULL;43 #endif44 41 char tbuf[MAXPATHLEN]; 45 42 … … 50 47 { 51 48 strcpy(executable, name); 52 #ifdef __CYGWIN__53 strcat(executable, ".exe");54 #endif55 49 return executable; 56 50 } … … 75 69 { 76 70 strcpy(executable, tbuf); 77 #ifdef __CYGWIN__78 strcat(executable, ".exe");79 #endif80 71 return executable; 81 72 } … … 85 76 search = getenv("PATH"); 86 77 /* for winnt under msdos, cwd is implictly in the path */ 87 #ifdef WINNT88 p = getenv("SHELL");89 if (p == NULL || strlen(p) < 2)90 {91 char *extra = NULL;92 /* we are under msdos display */93 extra = (char*) malloc((search != NULL ? strlen(search) : 0) + 3);94 strcpy(extra, ".:");95 if (search != NULL) strcat(extra, search);96 search = extra;97 }98 #endif99 78 p = search; 100 79 … … 129 108 if (! access (tbuf, F_OK)) 130 109 { 131 #ifdef WINNT132 if (extra != NULL)133 free(extra);134 #endif135 110 strcpy(executable, tbuf); 136 #ifdef __CYGWIN__137 strcat(executable, ".exe");138 #endif139 111 return executable; 140 112 } … … 219 191 } 220 192 221 #ifdef WINNT 193 #ifdef __CYGWIN__ 194 /* for windows, serch first for .exe */ 222 195 char * _omFindExec (const char *name, char* exec); 223 /* for windows, serch first for .exe */224 196 char* omFindExec(const char *name, char* exec) 225 197 {
Note: See TracChangeset
for help on using the changeset viewer.