vim/xxd-locale.patch

32 lines
846 B
Diff
Raw Normal View History

auto-import changelog data from vim-6.0-7.13.src.rpm Mon Jan 28 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-13 - Patchlevel 152 - Add symlinks for evim, rvim and vimdiff as described in vim docs Tue Jan 22 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-12 - Patchlevel 149 Tue Jan 22 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-11 - Patchlevel 147 Thu Dec 27 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-9 - Patchlevel 101 Mon Nov 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-8 - Patchlevel 93 Mon Nov 05 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-7 - 6.0pl78 - Move desktop file (Utilities -> Applications), #53503 Thu Nov 01 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-6 - 6.0pl61 Wed Oct 31 2001 Bernhard Rosenkraenzer <bero@redhat.com> - 6.0pl44 Mon Oct 29 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-5 - 6.0pl36 - Fix build with gcc 3.1 Tue Oct 23 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-4 - 6.0pl21 - Don't show an error message when trying to "return" to a line that no longer exists (#54551) Mon Oct 22 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-3 - 6.0pl19 Sun Sep 30 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-2 - 6.0pl11 Wed Sep 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-1 - 6.0 Thu Sep 13 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-0.av.1 - 6.0av - Use -Os in rescue mode Tue Sep 04 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-0.au.1 - Update to 6.0au - Allow rescue build Tue Aug 28 2001 Bernhard Rosenkraenzer <bero@redhat.com> 6.0-0.at.1 - vim 6.0at - Increase epoch so we can update 7.2 systems
2004-09-09 13:58:58 +00:00
--- vim60ag/src/xxd/xxd.c.37073 Mon May 21 16:17:29 2001
+++ vim60ag/src/xxd/xxd.c Mon May 21 16:32:12 2001
@@ -81,6 +81,7 @@
#if __MWERKS__ && !defined(BEBOX)
# include <unix.h> /* for fdopen() on MAC */
#endif
+#include <locale.h>
/* This corrects the problem of missing prototypes for certain functions
* in some GNU installations (e.g. SunOS 4.1.x).
@@ -424,6 +425,11 @@
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)
+ setlocale(LC_ALL, lang);
#ifdef AMIGA
/* This program doesn't work when started from the Workbench */
@@ -728,7 +734,7 @@
#else
(e > 31 && e < 127)
#endif
- ? e : '.';
+ ? e : isalnum(e) ? e : '.';
if (e)
nonzero++;
n++;