Changeset 1213 for trunk/src/kash/sys_signame.c
- Timestamp:
- Oct 7, 2007, 9:13:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/sys_signame.c
r813 r1213 1 1 /* 2 * Fake sys_signame. 2 * Fake sys_signame. 3 3 */ 4 4 5 #include <signal.h>5 #include "shinstance.h" /* for MSC */ 6 6 #include <string.h> 7 7 #include <stdio.h> … … 9 9 static char sys_signame_initialized = 0; 10 10 char sys_signame[NSIG][16]; 11 11 12 12 void init_sys_signame(void) 13 13 { 14 14 unsigned i; 15 15 if (sys_signame_initialized) 16 17 18 16 return; 17 for (i = 0; i < NSIG; ++i) 18 sprintf(sys_signame[i], "%d", i); 19 19 #define SET_SIG_STR(sig) strcpy(sys_signame[SIG##sig], #sig); 20 20 #ifdef SIGHUP 21 22 #endif 21 SET_SIG_STR(HUP); 22 #endif 23 23 #ifdef SIGINT 24 25 #endif 24 SET_SIG_STR(INT); 25 #endif 26 26 #ifdef SIGQUIT 27 28 #endif 27 SET_SIG_STR(QUIT); 28 #endif 29 29 #ifdef SIGILL 30 31 #endif 30 SET_SIG_STR(ILL); 31 #endif 32 32 #ifdef SIGTRAP 33 34 #endif 33 SET_SIG_STR(TRAP); 34 #endif 35 35 #ifdef SIGABRT 36 37 #endif 36 SET_SIG_STR(ABRT); 37 #endif 38 38 #ifdef SIGIOT 39 40 #endif 39 SET_SIG_STR(IOT); 40 #endif 41 41 #ifdef SIGBUS 42 43 #endif 42 SET_SIG_STR(BUS); 43 #endif 44 44 #ifdef SIGFPE 45 46 #endif 45 SET_SIG_STR(FPE); 46 #endif 47 47 #ifdef SIGKILL 48 49 #endif 48 SET_SIG_STR(KILL); 49 #endif 50 50 #ifdef SIGUSR1 51 52 #endif 51 SET_SIG_STR(USR1); 52 #endif 53 53 #ifdef SIGSEGV 54 55 #endif 54 SET_SIG_STR(SEGV); 55 #endif 56 56 #ifdef SIGUSR2 57 58 #endif 57 SET_SIG_STR(USR2); 58 #endif 59 59 #ifdef SIGPIPE 60 61 #endif 60 SET_SIG_STR(PIPE); 61 #endif 62 62 #ifdef SIGALRM 63 64 #endif 63 SET_SIG_STR(ALRM); 64 #endif 65 65 #ifdef SIGTERM 66 67 #endif 66 SET_SIG_STR(TERM); 67 #endif 68 68 #ifdef SIGSTKFLT 69 70 #endif 69 SET_SIG_STR(STKFLT); 70 #endif 71 71 #ifdef SIGCHLD 72 73 #endif 72 SET_SIG_STR(CHLD); 73 #endif 74 74 #ifdef SIGCONT 75 76 #endif 75 SET_SIG_STR(CONT); 76 #endif 77 77 #ifdef SIGSTOP 78 79 #endif 78 SET_SIG_STR(STOP); 79 #endif 80 80 #ifdef SIGTSTP 81 82 #endif 81 SET_SIG_STR(TSTP); 82 #endif 83 83 #ifdef SIGTTIN 84 85 #endif 84 SET_SIG_STR(TTIN); 85 #endif 86 86 #ifdef SIGTTOU 87 88 #endif 87 SET_SIG_STR(TTOU); 88 #endif 89 89 #ifdef SIGURG 90 91 #endif 90 SET_SIG_STR(URG); 91 #endif 92 92 #ifdef SIGXCPU 93 94 #endif 93 SET_SIG_STR(XCPU); 94 #endif 95 95 #ifdef SIGXFSZ 96 97 #endif 96 SET_SIG_STR(XFSZ); 97 #endif 98 98 #ifdef SIGVTALRM 99 100 #endif 99 SET_SIG_STR(VTALRM); 100 #endif 101 101 #ifdef SIGPROF 102 103 #endif 102 SET_SIG_STR(PROF); 103 #endif 104 104 #ifdef SIGWINCH 105 106 #endif 105 SET_SIG_STR(WINCH); 106 #endif 107 107 #ifdef SIGIO 108 109 #endif 108 SET_SIG_STR(IO); 109 #endif 110 110 #ifdef SIGPWR 111 112 #endif 111 SET_SIG_STR(PWR); 112 #endif 113 113 #ifdef SIGSYS 114 115 #endif 114 SET_SIG_STR(SYS); 115 #endif 116 116 #ifdef SIGBREAK 117 118 #endif 117 SET_SIG_STR(BREAK); 118 #endif 119 119 #undef SET_SIG_STR 120 120 sys_signame_initialized = 1; 121 121 }
Note:
See TracChangeset
for help on using the changeset viewer.