Changeset 1199 for trunk/src/kash/miscbltin.c
- Timestamp:
- Oct 7, 2007, 12:04:05 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/miscbltin.c
r1198 r1199 113 113 114 114 if (prompt && isatty(0)) { 115 out2str(p rompt);116 output_flushall( );115 out2str(psh, prompt); 116 output_flushall(psh); 117 117 } 118 118 119 119 if (*(ap = argptr) == NULL) 120 error( "arg count");120 error(psh, "arg count"); 121 121 122 122 if ((ifs = bltinlookup("IFS", 1)) == NULL) … … 261 261 o[i] = '\0'; 262 262 263 out1fmt( "u=%s,g=%s,o=%s\n", u, g, o);263 out1fmt(psh, "u=%s,g=%s,o=%s\n", u, g, o); 264 264 } else { 265 out1fmt( "%.4o\n", mask);265 out1fmt(psh, "%.4o\n", mask); 266 266 } 267 267 } else { … … 270 270 do { 271 271 if (*ap >= '8' || *ap < '0') 272 error( "Illegal number: %s", argv[1]);272 error(psh, "Illegal number: %s", argv[1]); 273 273 mask = (mask << 3) + (*ap - '0'); 274 274 } while (*++ap != '\0'); … … 288 288 INTON; 289 289 if (!set) 290 error( "Illegal mode: %s", ap);290 error(psh, "Illegal mode: %s", ap); 291 291 292 292 umask(~mask & 0777); … … 384 384 ; 385 385 if (!l->name) 386 error( "internal error (%c)", what);386 error(psh, "internal error (%c)", what); 387 387 388 388 set = *argptr ? 1 : 0; … … 391 391 392 392 if (all || argptr[1]) 393 error( "too many arguments");393 error(psh, "too many arguments"); 394 394 if (strcmp(p, "unlimited") == 0) 395 395 val = RLIM_INFINITY; … … 404 404 } 405 405 if (c) 406 error( "bad number");406 error(psh, "bad number"); 407 407 val *= l->factor; 408 408 } … … 416 416 val = limit.rlim_max; 417 417 418 out1fmt( "%-20s ", l->name);418 out1fmt(psh, "%-20s ", l->name); 419 419 if (val == RLIM_INFINITY) 420 420 out1fmt("unlimited\n"); … … 423 423 val /= l->factor; 424 424 #ifdef BSD4_4 425 out1fmt( "%lld\n", (long long) val);425 out1fmt(psh, "%lld\n", (long long) val); 426 426 #else 427 out1fmt( "%ld\n", (long) val);427 out1fmt(psh, "%ld\n", (long) val); 428 428 #endif 429 429 } … … 439 439 limit.rlim_cur = val; 440 440 if (setrlimit(l->cmd, &limit) < 0) 441 error( "error setting limit (%s)", strerror(errno));441 error(psh, "error setting limit (%s)", strerror(errno)); 442 442 } else { 443 443 if (how & SOFT) … … 447 447 448 448 if (val == RLIM_INFINITY) 449 out1fmt( "unlimited\n");449 out1fmt(psh, "unlimited\n"); 450 450 else 451 451 { 452 452 val /= l->factor; 453 453 #ifdef BSD4_4 454 out1fmt( "%lld\n", (long long) val);454 out1fmt(psh, "%lld\n", (long long) val); 455 455 #else 456 out1fmt( "%ld\n", (long) val);456 out1fmt(psh, "%ld\n", (long) val); 457 457 #endif 458 458 }
Note:
See TracChangeset
for help on using the changeset viewer.