]> git.draconx.ca Git - dxcommon.git/blobdiff - src/help.c
Add object prefixing option for DX_GNULIB_SYMFILES.
[dxcommon.git] / src / help.c
index d1dd5f5bc44055bf50a4599b0e1f24cf15ddc0bf..ea817e84ae47e485bfd9425d50510782a5da5294 100644 (file)
@@ -28,6 +28,7 @@
 #endif
 
 #if ENABLE_NLS
+#      include <locale.h>
 #      include <gettext.h>
 #      include <mbswidth.h>
 #else
@@ -179,7 +180,10 @@ out:
 
 void help_print_desc(const struct option *opt, const char *s, int i, int w)
 {
-       for (s = pgettext_expr(opt->name, s); *s; w = 0) {
+       if (opt)
+               s = pgettext_expr(opt->name, s);
+
+       for (; *s; w = 0) {
                const char *nl = strchr(s, '\n');
                int n = (nl ? nl-s : -1);