]> git.pld-linux.org Git - packages/busybox.git/blobdiff - busybox-printf-gettext.patch
- updated for 1.3.1
[packages/busybox.git] / busybox-printf-gettext.patch
index d46886fecef6a100625e19ac23923d2c087cf45e..e11ef84e2ded4f390e449f56df14e16e1df0c87a 100644 (file)
@@ -1,22 +1,18 @@
---- busybox-1.00-pre10/coreutils/printf.c.orig Mon Mar 15 09:28:21 2004
-+++ busybox-1.00-pre10/coreutils/printf.c      Fri May 14 16:22:51 2004
-@@ -47,8 +47,13 @@
+--- busybox-1.3.1/coreutils/printf.c.orig      2006-12-27 05:54:50.000000000 +0100
++++ busybox-1.3.1/coreutils/printf.c   2006-12-30 12:28:27.605589427 +0100
+@@ -38,6 +38,9 @@
  
  //   19990508 Busy Boxed! Dave Cinege
  
 +// on by default
 +#define BB_FEATURE_PRINTF_GETTEXT
 +
- #include <unistd.h>
- #include <stdio.h>
-+#include <sys/mman.h>
-+#include <sys/stat.h>
- #include <sys/types.h>
- #include <string.h>
- #include <errno.h>
-@@ -114,19 +119,139 @@
- /* The value to return to the calling program.  */
- static int exit_status;
+ #include "busybox.h"
+ static int print_formatted(char *format, int argc, char **argv);
+@@ -109,18 +112,137 @@
+       }
+ }
  
 +/*
 + * Very pure gettext added by Michal Moskal <malekith@pld-linux.org>
 +      int opt;
 +      const char *nls_file = NULL;
  
-       exit_status = 0;
--      if (argc <= 1 || **(argv + 1) == '-') {
+-      if (argc <= 1 || argv[1][0] == '-') {
 -              bb_show_usage();
 -      }
--      format = argv[1];
--      argc -= 2;
--      argv += 2;
 +      while ((opt = getopt(argc, argv, "n:")) != -1)
 +              switch (opt) {
 +              case 'n':
 +              }
 +
 +      format = getmsg(nls_file, argv[optind++]);
-+
+-      format = argv[1];
+-      argc -= 2;
+-      argv += 2;
 +      argc -= optind;
 +      argv += optind;
  
This page took 0.033485 seconds and 4 git commands to generate.