]> err.no Git - util-linux/commitdiff
pg: add gettext call for the help string
authorKarel Zak <kzak@redhat.com>
Fri, 12 Dec 2008 14:13:44 +0000 (15:13 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Dec 2008 14:13:44 +0000 (15:13 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/pg.c

index ede5a32ba6dfdb0449fad98a0da590a59b3661aa..30c67009e2b2646ba97333ba5ffdad3fb49295f1 100644 (file)
@@ -220,7 +220,8 @@ smalloc(size_t s)
 {
         char *m = (char *)malloc(s);
         if (m == NULL) {
-                write(2, _("Out of memory\n"), 14);
+               char *p = _("Out of memory\n");
+                write(2, p, strlen(p));
                 quit(++exitstatus);
         }
         return m;
@@ -1502,12 +1503,15 @@ found_bw:
                                }
                                goto newcmd;
                        case 'h':
+                       {
                                /*
                                 * Help!
                                 */
+                               char *help = _(helpscreen);
                                write(1, copyright + 4, strlen(copyright + 4));
-                               write(1, helpscreen, strlen(helpscreen));
+                               write(1, help, strlen(help));
                                goto newcmd;
+                       }
                        case 'n':
                                /*
                                 * Next file.