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