Changeset 3186 for trunk/src/kmk/main.c
- Timestamp:
- Mar 23, 2018, 11:44:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/main.c
r3170 r3186 1242 1242 batch_mode_shell = 1; 1243 1243 unixy_shell = 0; 1244 # if 1 /* bird: sprintf? wtf. */ 1245 default_shell = unix_slashes (xstrdup (search_token)); 1246 # else 1244 1247 sprintf (sh_path, "%s", search_token); 1245 1248 default_shell = xstrdup (w32ify (sh_path, 0)); 1249 # endif 1246 1250 DB (DB_VERBOSE, (_("find_and_set_shell() setting default_shell = %s\n"), 1247 1251 default_shell)); … … 1257 1261 { 1258 1262 /* search token path was found */ 1263 # if 1 /* bird: sprintf? wtf. */ 1264 default_shell = unix_slashes (xstrdup (search_token)); 1265 # else 1259 1266 sprintf (sh_path, "%s", search_token); 1260 1267 default_shell = xstrdup (w32ify (sh_path, 0)); 1268 # endif 1261 1269 DB (DB_VERBOSE, (_("find_and_set_shell() setting default_shell = %s\n"), 1262 1270 default_shell)); … … 1280 1288 *ep = '\0'; 1281 1289 1290 # if 1 /* bird: insanity insurance */ 1291 _snprintf (sh_path, GET_PATH_MAX, "%s/%s", p, search_token); 1292 # else 1282 1293 sprintf (sh_path, "%s/%s", p, search_token); 1294 # endif 1283 1295 if (_access (sh_path, 0) == 0) 1284 1296 { 1297 # if 1 /* bird: we can modify sh_path directly. */ 1298 default_shell = xstrdup (unix_slashes (sh_path)); 1299 # else 1285 1300 default_shell = xstrdup (w32ify (sh_path, 0)); 1301 # endif 1286 1302 sh_found = 1; 1287 1303 *ep = PATH_SEPARATOR_CHAR; … … 1302 1318 if (p && *p) 1303 1319 { 1320 # if 1 /* bird: insanity insurance */ 1321 _snprintf (sh_path, GET_PATH_MAX, "%s/%s", p, search_token); 1322 # else 1304 1323 sprintf (sh_path, "%s/%s", p, search_token); 1324 # endif 1305 1325 if (_access (sh_path, 0) == 0) 1306 1326 { 1327 # if 1 /* bird: we can modify sh_path directly. */ 1328 default_shell = xstrdup (unix_slashes (sh_path)); 1329 # else 1307 1330 default_shell = xstrdup (w32ify (sh_path, 0)); 1331 # endif 1308 1332 sh_found = 1; 1309 1333 } … … 2130 2154 if (strpbrk (argv[0], "/:\\") || strstr (argv[0], "..") 2131 2155 || strneq (argv[0], "//", 2)) 2132 argv[0] = xstrdup (w32ify (argv[0], 1)); 2156 # if 1 /* bird */ 2157 { 2158 PATH_VAR (tmp_path_buf); 2159 argv[0] = xstrdup (unix_slashes_resolved (argv[0], tmp_path_buf, 2160 GET_PATH_MAX)); 2161 } 2162 # else /* bird */ 2163 //argv[0] = xstrdup (w32ify (argv[0], 1)); 2164 # endif /* bird */ 2133 2165 #else /* WINDOWS32 */ 2134 2166 #if defined (__MSDOS__) || defined (__EMX__)
Note:
See TracChangeset
for help on using the changeset viewer.