diff options
author | Karel Zak | 2006-12-07 00:25:39 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:39 +0100 |
commit | 7eda085c41faa3445b4b168ce78ab18dab87d98a (patch) | |
tree | eb8da4baebd0af68fa84818d3d51b4a3714667fc /misc-utils/look.c | |
parent | Imported from util-linux-2.9i tarball. (diff) | |
download | kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.tar.gz kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.tar.xz kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.zip |
Imported from util-linux-2.9v tarball.
Diffstat (limited to 'misc-utils/look.c')
-rw-r--r-- | misc-utils/look.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/misc-utils/look.c b/misc-utils/look.c index 72256c197..9e6c15bf8 100644 --- a/misc-utils/look.c +++ b/misc-utils/look.c @@ -34,6 +34,10 @@ * SUCH DAMAGE. */ + /* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org> + * - added Native Language Support + */ + /* * look -- find lines in a sorted list. * @@ -56,6 +60,7 @@ #include <getopt.h> #include <locale.h> #include "pathnames.h" +#include "nls.h" #define EQUAL 0 #define GREATER 1 @@ -84,6 +89,10 @@ main(int argc, char *argv[]) char *back, *file, *front, *p; setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + setlocale(LC_ALL, ""); file = _PATH_WORDS; termchar = '\0'; @@ -158,7 +167,7 @@ look(char *front, char *back) comparbuf = malloc(stringlen+1); if (comparbuf == NULL) - err("Out of memory"); + err(_("Out of memory")); front = binary_search(front, back); front = linear_search(front, back); @@ -328,7 +337,7 @@ compare(char *s2, char *s2end, int nocase) { static void usage() { - (void)fprintf(stderr, "usage: look [-dfa] [-t char] string [file]\n"); + (void)fprintf(stderr, _("usage: look [-dfa] [-t char] string [file]\n")); exit(2); } |