- Timestamp:
- Feb 4, 2007 12:09:12 PM (18 years ago)
- Location:
- trunk/src/ash
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/bltin/kill.c
r809 r843 30 30 */ 31 31 32 #if ndef __sun__32 #ifdef HAVE_SYS_CDEFS_H 33 33 #include <sys/cdefs.h> 34 34 #endif … … 63 63 extern void init_sys_signame(void); 64 64 extern char sys_signame[NSIG][16]; 65 #endif 65 #endif 66 66 67 67 #ifdef SHELL /* sh (aka ash) builtin */ … … 109 109 #ifndef HAVE_SYS_SIGNAME 110 110 init_sys_signame(); 111 #endif 111 #endif 112 112 printf("%s\n", sys_signame[numsig]); 113 113 exit(0); … … 193 193 #ifndef HAVE_SYS_SIGNAME 194 194 init_sys_signame(); 195 #endif 195 #endif 196 196 if (strncasecmp(sig, "sig", 3) == 0) 197 197 sig += 3; … … 230 230 #ifndef _MSC_VER 231 231 #warning TIOCGWINSZ is not present. 232 #endif 232 #endif 233 233 #endif 234 234 #ifndef HAVE_SYS_SIGNAME 235 235 init_sys_signame(); 236 #endif 236 #endif 237 237 238 238 for (len = 0, sig = 1; sig < NSIG; sig++) { -
trunk/src/ash/bltin/printf.c
r626 r843 30 30 */ 31 31 32 #ifdef HAVE_SYS_CDEFS_H 32 33 #include <sys/cdefs.h> 34 #endif 33 35 #ifndef lint 34 36 #if !defined(BUILTIN) && !defined(SHELL) … … 77 79 static char *mklong(const char *, int); 78 80 static void check_conversion(const char *, const char *); 79 static void usage(void); 81 static void usage(void); 80 82 81 83 static void b_count(int); … … 158 160 * Basic algorithm is to scan the format string for conversion 159 161 * specifications -- once one is found, find out if the field 160 * width or precision is a '*'; if it is, gather up value. 162 * width or precision is a '*'; if it is, gather up value. 161 163 * Note, format strings are reused as necessary to use up the 162 * provided arguments, arguments of zero/null string are 164 * provided arguments, arguments of zero/null string are 163 165 * provided to use up the format string. 164 166 */ … … 322 324 323 325 /* 324 * Print SysV echo(1) style escape string 326 * Print SysV echo(1) style escape string 325 327 * Halts processing string if a \c escape is encountered. 326 328 */ … … 345 347 } 346 348 347 /* 349 /* 348 350 * %b string octal constants are not like those in C. 349 * They start with a \0, and are followed by 0, 1, 2, 350 * or 3 octal digits. 351 * They start with a \0, and are followed by 0, 1, 2, 352 * or 3 octal digits. 351 353 */ 352 354 if (ch == '0') { … … 390 392 391 393 /* 392 * Print "standard" escape characters 394 * Print "standard" escape characters 393 395 */ 394 396 static char * … … 519 521 { 520 522 static char copy[64]; 521 size_t len; 523 size_t len; 522 524 523 525 len = strlen(str) + 2; … … 530 532 copy[len - 2] = ch; 531 533 copy[len - 1] = '\0'; 532 return copy; 534 return copy; 533 535 } 534 536 -
trunk/src/ash/bltin/test.c
r809 r843 11 11 */ 12 12 13 #if ndef __sun__13 #ifdef HAVE_SYS_CDEFS_H 14 14 #include <sys/cdefs.h> 15 15 #endif … … 196 196 #ifdef HAVE_SETPROGNAME 197 197 setprogname(argv[0]); 198 #endif 198 #endif 199 199 if (strcmp(argv[0], "[") == 0) { 200 200 if (strcmp(argv[--argc], "]")) … … 292 292 if (t_lex(t_wp[1]), t_wp_op && t_wp_op->op_type == BINOP) { 293 293 return binop(); 294 } 294 } 295 295 296 296 return strlen(*t_wp) > 0; … … 309 309 if ((opnd2 = *++t_wp) == NULL) 310 310 syntax(op->op_text, "argument expected"); 311 311 312 312 switch (op->op_num) { 313 313 case STREQ: … … 369 369 #else 370 370 return 0; 371 #endif 371 #endif 372 372 case FILBDEV: 373 373 #ifdef S_ISBLK … … 375 375 #else 376 376 return 0; 377 #endif 377 #endif 378 378 case FILFIFO: 379 379 #ifdef S_ISFIFO … … 381 381 #else 382 382 return 0; 383 #endif 383 #endif 384 384 case FILSOCK: 385 385 #ifdef S_ISSOCK … … 387 387 #else 388 388 return 0; 389 #endif 389 #endif 390 390 case FILSYM: 391 391 return S_ISLNK(s.st_mode); … … 399 399 #else 400 400 return 0; 401 #endif 401 #endif 402 402 case FILGZ: 403 403 return s.st_size > (off_t)0; … … 450 450 if (strcmp(s, op->op_text) == 0) 451 451 return op->op_type == BINOP && 452 (t[0] != ')' || t[1] != '\0'); 452 (t[0] != ')' || t[1] != '\0'); 453 453 op++; 454 454 } … … 471 471 while (isspace((unsigned char)*p)) 472 472 p++; 473 473 474 474 if (*p) 475 475 error("%s: bad number", s); -
trunk/src/ash/cd.c
r809 r843 33 33 */ 34 34 35 #if ndef __sun__35 #ifdef HAVE_SYS_CDEFS_H 36 36 #include <sys/cdefs.h> 37 37 #endif
Note:
See TracChangeset
for help on using the changeset viewer.