Changeset 1200 for trunk/src/kash/exec.c
- Timestamp:
- Oct 7, 2007, 12:11:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/exec.c
r1199 r1200 154 154 } else { 155 155 e = ENOENT; 156 while ((cmdname = padvance( &path, argv[0])) != NULL) {156 while ((cmdname = padvance(psh, &path, argv[0])) != NULL) { 157 157 if (--idx < 0 && pathopt == NULL) { 158 158 tryexec(cmdname, argv, envp, vforked, has_ext); … … 310 310 while (*ap2++ = *ap++); 311 311 TRACE((psh, "hash bang '%s'\n", new[0])); 312 shellexec( new, envp, pathval(), 0, 0);312 shellexec(psh, new, envp, pathval(), 0, 0); 313 313 /* NOTREACHED */ 314 314 } … … 458 458 || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0))) 459 459 delete_cmd_entry(); 460 find_command( name, &entry, DO_ERR, pathval());460 find_command(psh, name, &entry, DO_ERR, pathval()); 461 461 if (verbose) { 462 462 if (entry.cmdtype != CMDUNKNOWN) { /* if no error msg */ … … 484 484 path = pathval(); 485 485 do { 486 name = padvance( &path, cmdp->cmdname);486 name = padvance(psh, &path, cmdp->cmdname); 487 487 stunalloc(psh, name); 488 488 } while (--idx >= 0); … … 607 607 /* If %builtin not in path, check for builtin next */ 608 608 if ((act & DO_ALTPATH ? !(act & DO_ALTBLTIN) : builtinloc < 0) && 609 (bltin = find_builtin( name)) != 0)609 (bltin = find_builtin(psh, name)) != 0) 610 610 goto builtin_success; 611 611 … … 622 622 idx = -1; 623 623 loop: 624 while ((fullname = padvance( &path, name)) != NULL) {624 while ((fullname = padvance(psh, &path, name)) != NULL) { 625 625 stunalloc(psh, fullname); 626 626 idx++; 627 627 if (pathopt) { 628 628 if (prefix("builtin", pathopt)) { 629 if ((bltin = find_builtin( name)) == 0)629 if ((bltin = find_builtin(psh, name)) == 0) 630 630 goto loop; 631 631 goto builtin_success; … … 892 892 893 893 #ifdef mkinit 894 MKINIT void deletefuncs( void);895 MKINIT void hash_special_builtins( void);894 MKINIT void deletefuncs(struct shinstance *); 895 MKINIT void hash_special_builtins(struct shinstance *); 896 896 897 897 INIT { 898 hash_special_builtins( );898 hash_special_builtins(psh); 899 899 } 900 900 901 901 SHELLPROC { 902 deletefuncs( );902 deletefuncs(psh); 903 903 } 904 904 #endif … … 1043 1043 entry.cmdtype = CMDFUNCTION; 1044 1044 entry.u.func = copyfunc(func); 1045 addcmdentry( name, &entry);1045 addcmdentry(psh, name, &entry); 1046 1046 INTON; 1047 1047 } … … 1126 1126 } else { 1127 1127 /* Finally use brute force */ 1128 find_command( arg, &entry, DO_ABS, pathval());1128 find_command(psh, arg, &entry, DO_ABS, pathval()); 1129 1129 } 1130 1130 … … 1136 1136 int j = entry.u.index; 1137 1137 do { 1138 name = padvance( &path, arg);1138 name = padvance(psh, &path, arg); 1139 1139 stunalloc(psh, name); 1140 1140 } while (--j >= 0);
Note:
See TracChangeset
for help on using the changeset viewer.