test/test.c
@@ -1,15 +1,10 @@ #include "usg_common.h" #include "usg_typedef.h" int test(char *src, int size) { int i = strlen(src); char dest[size]; strncpy(dest, src, size); puts(dest); return i; static void sig_quit(int); #define SIGCLOSE1 (SIGRTMIN +1) int main(void) { printf("%d, %d , %d\n", SIGRTMIN, SIGRTMAX, SIGCLOSE1); /* SIGQUIT here will terminate with core file */ } int main() { char *str = "hello"; int r = test(str, strlen(str)); printf("%d\n", r); }