2008-07-18 12:24:46 +00:00
|
|
|
diff -up vim71/src/xxd/xxd.c.xxd vim71/src/xxd/xxd.c
|
|
|
|
--- vim71/src/xxd/xxd.c.xxd 2008-07-18 14:21:03.000000000 +0200
|
|
|
|
+++ vim71/src/xxd/xxd.c 2008-07-18 14:23:48.000000000 +0200
|
|
|
|
@@ -90,6 +90,7 @@
|
2004-09-09 13:58:58 +00:00
|
|
|
#if __MWERKS__ && !defined(BEBOX)
|
|
|
|
# include <unix.h> /* for fdopen() on MAC */
|
|
|
|
#endif
|
|
|
|
+#include <locale.h>
|
|
|
|
|
2008-07-18 12:24:46 +00:00
|
|
|
#if defined(__BORLANDC__) && __BORLANDC__ <= 0x0410 && !defined(fileno)
|
|
|
|
/* Missing define and prototype grabbed from the BC 4.0 <stdio.h> */
|
|
|
|
@@ -452,6 +453,11 @@ char *argv[];
|
2004-09-09 13:58:58 +00:00
|
|
|
long length = -1, n = 0, seekoff = 0;
|
|
|
|
char l[LLEN+1];
|
|
|
|
char *pname, *pp;
|
|
|
|
+ char *lang=getenv("LANG");
|
|
|
|
+ if(!lang) lang=getenv("LC_ALL");
|
|
|
|
+ if(!lang) lang=getenv("LC_CTYPE");
|
|
|
|
+ if(lang)
|
2008-07-18 12:24:46 +00:00
|
|
|
+ setlocale(LC_ALL, lang);
|
2004-09-09 13:58:58 +00:00
|
|
|
|
|
|
|
#ifdef AMIGA
|
|
|
|
/* This program doesn't work when started from the Workbench */
|
2008-07-18 12:24:46 +00:00
|
|
|
@@ -756,7 +762,7 @@ char *argv[];
|
2004-09-09 13:58:58 +00:00
|
|
|
#else
|
|
|
|
(e > 31 && e < 127)
|
|
|
|
#endif
|
|
|
|
- ? e : '.';
|
|
|
|
+ ? e : isalnum(e) ? e : '.';
|
|
|
|
if (e)
|
2008-07-18 12:24:46 +00:00
|
|
|
nonzero++;
|
2004-09-09 13:58:58 +00:00
|
|
|
n++;
|