summaryrefslogtreecommitdiffstats
path: root/src/i18n.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 13:17:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 13:17:26 +0000
commita4dc4fbcc1b131061dcccd5cdcc2395d9a2ba784 (patch)
treebc531e7e083fff1668bb4e79e9692d8cc47aea95 /src/i18n.h
parentInitial commit. (diff)
downloadpsmisc-upstream.tar.xz
psmisc-upstream.zip
Adding upstream version 23.7.upstream/23.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/i18n.h')
-rw-r--r--src/i18n.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/i18n.h b/src/i18n.h
new file mode 100644
index 0000000..a0b4439
--- /dev/null
+++ b/src/i18n.h
@@ -0,0 +1,26 @@
+/* i18n.h - common i18n declarations for psmisc programs. */
+
+#ifndef I18N_H
+#define I18N_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef ENABLE_NLS
+#include <locale.h>
+#include <libintl.h>
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#endif
+
+#ifndef HAVE_RPMATCH
+#define rpmatch(line) \
+ ( (line == NULL)? -1 : \
+ (*line == 'y' || *line == 'Y')? 1 : \
+ (*line == 'n' || *line == 'N')? 0 : \
+ -1 )
+#endif