From 28ef4c4dacc6fee628e65f07b52a4d2f0efe7fb3 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 28 Jul 1999 06:23:37 +0000 Subject: * Add gettext macros to start i18n support. --- signame.c | 90 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 46 insertions(+), 44 deletions(-) (limited to 'signame.c') diff --git a/signame.c b/signame.c index dd73723..8ddbb36 100644 --- a/signame.c +++ b/signame.c @@ -17,9 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "make.h" #include #include /* Some systems need this for . */ @@ -56,7 +54,7 @@ /* There is too much variation in Sys V signal numbers and names, so we must initialize them at runtime. */ -static const char undoc[] = "unknown signal"; +static const char *undoc; const char *sys_siglist[NSIG]; @@ -109,6 +107,10 @@ signame_init () { #ifndef HAVE_SYS_SIGLIST int i; + char *u = _("unknown signal"); + + undoc = xstrdup(u); + /* Initialize signal names. */ for (i = 0; i < NSIG; i++) sys_siglist[i] = undoc; @@ -116,135 +118,135 @@ signame_init () /* Initialize signal names. */ #if defined (SIGHUP) - init_sig (SIGHUP, "HUP", "Hangup"); + init_sig (SIGHUP, "HUP", _("Hangup")); #endif #if defined (SIGINT) - init_sig (SIGINT, "INT", "Interrupt"); + init_sig (SIGINT, "INT", _("Interrupt")); #endif #if defined (SIGQUIT) - init_sig (SIGQUIT, "QUIT", "Quit"); + init_sig (SIGQUIT, "QUIT", _("Quit")); #endif #if defined (SIGILL) - init_sig (SIGILL, "ILL", "Illegal Instruction"); + init_sig (SIGILL, "ILL", _("Illegal Instruction")); #endif #if defined (SIGTRAP) - init_sig (SIGTRAP, "TRAP", "Trace/breakpoint trap"); + init_sig (SIGTRAP, "TRAP", _("Trace/breakpoint trap")); #endif /* If SIGIOT == SIGABRT, we want to print it as SIGABRT because SIGABRT is in ANSI and POSIX.1 and SIGIOT isn't. */ #if defined (SIGABRT) - init_sig (SIGABRT, "ABRT", "Aborted"); + init_sig (SIGABRT, "ABRT", _("Aborted")); #endif #if defined (SIGIOT) - init_sig (SIGIOT, "IOT", "IOT trap"); + init_sig (SIGIOT, "IOT", _("IOT trap")); #endif #if defined (SIGEMT) - init_sig (SIGEMT, "EMT", "EMT trap"); + init_sig (SIGEMT, "EMT", _("EMT trap")); #endif #if defined (SIGFPE) - init_sig (SIGFPE, "FPE", "Floating point exception"); + init_sig (SIGFPE, "FPE", _("Floating point exception")); #endif #if defined (SIGKILL) - init_sig (SIGKILL, "KILL", "Killed"); + init_sig (SIGKILL, "KILL", _("Killed")); #endif #if defined (SIGBUS) - init_sig (SIGBUS, "BUS", "Bus error"); + init_sig (SIGBUS, "BUS", _("Bus error")); #endif #if defined (SIGSEGV) - init_sig (SIGSEGV, "SEGV", "Segmentation fault"); + init_sig (SIGSEGV, "SEGV", _("Segmentation fault")); #endif #if defined (SIGSYS) - init_sig (SIGSYS, "SYS", "Bad system call"); + init_sig (SIGSYS, "SYS", _("Bad system call")); #endif #if defined (SIGPIPE) - init_sig (SIGPIPE, "PIPE", "Broken pipe"); + init_sig (SIGPIPE, "PIPE", _("Broken pipe")); #endif #if defined (SIGALRM) - init_sig (SIGALRM, "ALRM", "Alarm clock"); + init_sig (SIGALRM, "ALRM", _("Alarm clock")); #endif #if defined (SIGTERM) - init_sig (SIGTERM, "TERM", "Terminated"); + init_sig (SIGTERM, "TERM", _("Terminated")); #endif #if defined (SIGUSR1) - init_sig (SIGUSR1, "USR1", "User defined signal 1"); + init_sig (SIGUSR1, "USR1", _("User defined signal 1")); #endif #if defined (SIGUSR2) - init_sig (SIGUSR2, "USR2", "User defined signal 2"); + init_sig (SIGUSR2, "USR2", _("User defined signal 2")); #endif /* If SIGCLD == SIGCHLD, we want to print it as SIGCHLD because that is what is in POSIX.1. */ #if defined (SIGCHLD) - init_sig (SIGCHLD, "CHLD", "Child exited"); + init_sig (SIGCHLD, "CHLD", _("Child exited")); #endif #if defined (SIGCLD) - init_sig (SIGCLD, "CLD", "Child exited"); + init_sig (SIGCLD, "CLD", _("Child exited")); #endif #if defined (SIGPWR) - init_sig (SIGPWR, "PWR", "Power failure"); + init_sig (SIGPWR, "PWR", _("Power failure")); #endif #if defined (SIGTSTP) - init_sig (SIGTSTP, "TSTP", "Stopped"); + init_sig (SIGTSTP, "TSTP", _("Stopped")); #endif #if defined (SIGTTIN) - init_sig (SIGTTIN, "TTIN", "Stopped (tty input)"); + init_sig (SIGTTIN, "TTIN", _("Stopped (tty input)")); #endif #if defined (SIGTTOU) - init_sig (SIGTTOU, "TTOU", "Stopped (tty output)"); + init_sig (SIGTTOU, "TTOU", _("Stopped (tty output)")); #endif #if defined (SIGSTOP) - init_sig (SIGSTOP, "STOP", "Stopped (signal)"); + init_sig (SIGSTOP, "STOP", _("Stopped (signal)")); #endif #if defined (SIGXCPU) - init_sig (SIGXCPU, "XCPU", "CPU time limit exceeded"); + init_sig (SIGXCPU, "XCPU", _("CPU time limit exceeded")); #endif #if defined (SIGXFSZ) - init_sig (SIGXFSZ, "XFSZ", "File size limit exceeded"); + init_sig (SIGXFSZ, "XFSZ", _("File size limit exceeded")); #endif #if defined (SIGVTALRM) - init_sig (SIGVTALRM, "VTALRM", "Virtual timer expired"); + init_sig (SIGVTALRM, "VTALRM", _("Virtual timer expired")); #endif #if defined (SIGPROF) - init_sig (SIGPROF, "PROF", "Profiling timer expired"); + init_sig (SIGPROF, "PROF", _("Profiling timer expired")); #endif #if defined (SIGWINCH) /* "Window size changed" might be more accurate, but even if that is all that it means now, perhaps in the future it will be extended to cover other kinds of window changes. */ - init_sig (SIGWINCH, "WINCH", "Window changed"); + init_sig (SIGWINCH, "WINCH", _("Window changed")); #endif #if defined (SIGCONT) - init_sig (SIGCONT, "CONT", "Continued"); + init_sig (SIGCONT, "CONT", _("Continued")); #endif #if defined (SIGURG) - init_sig (SIGURG, "URG", "Urgent I/O condition"); + init_sig (SIGURG, "URG", _("Urgent I/O condition")); #endif #if defined (SIGIO) /* "I/O pending" has also been suggested. A disadvantage is that signal only happens when the process has asked for it, not everytime I/O is pending. Another disadvantage is the confusion from giving it a different name than under Unix. */ - init_sig (SIGIO, "IO", "I/O possible"); + init_sig (SIGIO, "IO", _("I/O possible")); #endif #if defined (SIGWIND) - init_sig (SIGWIND, "WIND", "SIGWIND"); + init_sig (SIGWIND, "WIND", _("SIGWIND")); #endif #if defined (SIGPHONE) - init_sig (SIGPHONE, "PHONE", "SIGPHONE"); + init_sig (SIGPHONE, "PHONE", _("SIGPHONE")); #endif #if defined (SIGPOLL) - init_sig (SIGPOLL, "POLL", "I/O possible"); + init_sig (SIGPOLL, "POLL", _("I/O possible")); #endif #if defined (SIGLOST) - init_sig (SIGLOST, "LOST", "Resource lost"); + init_sig (SIGLOST, "LOST", _("Resource lost")); #endif #if defined (SIGDANGER) - init_sig (SIGDANGER, "DANGER", "Danger signal"); + init_sig (SIGDANGER, "DANGER", _("Danger signal")); #endif #if defined (SIGINFO) - init_sig (SIGINFO, "INFO", "Information request"); + init_sig (SIGINFO, "INFO", _("Information request")); #endif #if defined (SIGNOFP) - init_sig (SIGNOFP, "NOFP", "Floating point co-processor not available"); + init_sig (SIGNOFP, "NOFP", _("Floating point co-processor not available")); #endif } -- cgit v1.2.3