[haiku-commits] r41691 - haiku/branches/developer/bonefish/signals/src/bin/debug/strace

Author: bonefish
Date: 2011-05-23 23:53:43 +0200 (Mon, 23 May 2011)
New Revision: 41691
Changeset: https://dev.haiku-os.org/changeset/41691

Modified:
   haiku/branches/developer/bonefish/signals/src/bin/debug/strace/strace.cpp
Log:
Removed kSignalName array. Use strsignal() instead.


Modified: 
haiku/branches/developer/bonefish/signals/src/bin/debug/strace/strace.cpp
===================================================================
--- haiku/branches/developer/bonefish/signals/src/bin/debug/strace/strace.cpp   
2011-05-23 21:53:12 UTC (rev 41690)
+++ haiku/branches/developer/bonefish/signals/src/bin/debug/strace/strace.cpp   
2011-05-23 21:53:43 UTC (rev 41691)
@@ -1,8 +1,9 @@
 /*
- * Copyright 2005-2008, Ingo Weinhold, bonefish@xxxxxxxxxxxxx
+ * Copyright 2005-2011, Ingo Weinhold, ingo_weinhold@xxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
+
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -25,6 +26,7 @@
 #include "Syscall.h"
 #include "TypeHandler.h"
 
+
 using std::map;
 using std::string;
 using std::vector;
@@ -89,38 +91,6 @@
 static const char *kTerminalTextMagenta        = "\33[35m";
 static const char *kTerminalTextBlue   = "\33[34m";
 
-static const char *kSignalName[] = {
-       /*  0 */ "SIG0",
-       /*  1 */ "SIGHUP",
-       /*  2 */ "SIGINT",
-       /*  3 */ "SIGQUIT",
-       /*  4 */ "SIGILL",
-       /*  5 */ "SIGCHLD",
-       /*  6 */ "SIGABRT",
-       /*  7 */ "SIGPIPE",
-       /*  8 */ "SIGFPE",
-       /*  9 */ "SIGKILL",
-       /* 10 */ "SIGSTOP",
-       /* 11 */ "SIGSEGV",
-       /* 12 */ "SIGCONT",
-       /* 13 */ "SIGTSTP",
-       /* 14 */ "SIGALRM",
-       /* 15 */ "SIGTERM",
-       /* 16 */ "SIGTTIN",
-       /* 17 */ "SIGTTOU",
-       /* 18 */ "SIGUSR1",
-       /* 19 */ "SIGUSR2",
-       /* 20 */ "SIGWINCH",
-       /* 21 */ "SIGKILLTHR",
-       /* 22 */ "SIGTRAP",
-       /* 23 */ "SIGPOLL",
-       /* 24 */ "SIGPROF",
-       /* 25 */ "SIGSYS",
-       /* 26 */ "SIGURG",
-       /* 27 */ "SIGVTALRM",
-       /* 28 */ "SIGXCPU",
-       /* 29 */ "SIGXFSZ",
-};
 
 // command line args
 static int sArgc;
@@ -329,7 +299,7 @@
 signal_name(int signal)
 {
        if (signal >= 0 && signal < NSIG)
-               return kSignalName[signal];
+               return strsignal(signal);
 
        static char buffer[32];
        sprintf(buffer, "%d", signal);


Other related posts:

  • » [haiku-commits] r41691 - haiku/branches/developer/bonefish/signals/src/bin/debug/strace - ingo_weinhold