Changeset 2293 for trunk/src/kash/show.c
- Timestamp:
- Feb 28, 2009, 8:25:12 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/show.c
r2289 r2293 274 274 trputc(shinstance *psh, int c) 275 275 { 276 if ( debug(psh) != 1)276 if (psh && debug(psh) != 1) 277 277 return; 278 278 putc(c, tracefile); … … 287 287 va_list va; 288 288 289 if ( (psh || !tracefile) && debug(psh) != 1)290 return; 291 289 if (!tracefile || (psh && debug(psh) != 1)) 290 return; 291 fprintf(tracefile, "[%d] ", sh_getpid(psh)); 292 292 va_start(va, fmt); 293 293 (void) vfprintf(tracefile, fmt, va); … … 304 304 int savederrno = errno; 305 305 306 if ( (psh || !tracefile) && debug(psh) != 1)307 return; 308 306 if (!tracefile || (psh && debug(psh) != 1)) 307 return; 308 fprintf(tracefile, "[%d] ", sh_getpid(psh)); 309 309 (void) vfprintf(tracefile, fmt, va); 310 310 … … 320 320 int savederrno = errno; 321 321 322 if ( (psh || !tracefile) && debug(psh) != 1)322 if (!tracefile || (psh && debug(psh) != 1)) 323 323 return; 324 324 fputs(s, tracefile); … … 335 335 char c; 336 336 337 if ( (psh || !tracefile) && debug(psh) != 1)337 if (!tracefile || (psh && debug(psh) != 1)) 338 338 return; 339 339 putc('"', tracefile); … … 378 378 int savederrno = errno; 379 379 380 if ( (psh || !tracefile) && debug(psh) != 1)380 if (!tracefile || (psh && debug(psh) != 1)) 381 381 return; 382 382 while (*ap) { … … 400 400 int fd; 401 401 402 if ( debug(psh) != 1) {402 if (psh && debug(psh) != 1) { 403 403 if (tracefile) 404 404 fflush(tracefile);
Note:
See TracChangeset
for help on using the changeset viewer.