mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.1.0023: xxd: few problems with EBCDIC for z/OS (MVS)
Problem: xxd: few problems with EBCDIC for z/OS (MVS) Solution: Fix xxd build and support ASCII and UTF-8 on z/OS (MVS) natively, add MVS guard checks with __CHARSET_LIB, support $LIBS in the Makefile (Igor Todorovski) related: #13821 Signed-off-by: Igor Todorovski <itodorov@ca.ibm.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
49471963fe
commit
48a75f3dfb
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
23,
|
||||||
/**/
|
/**/
|
||||||
22,
|
22,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# The most simplistic Makefile
|
# The most simplistic Makefile
|
||||||
|
|
||||||
xxd: xxd.c
|
xxd: xxd.c
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -DUNIX -o xxd xxd.c
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DUNIX -o xxd xxd.c $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f xxd xxd.o
|
rm -f xxd xxd.o
|
||||||
|
@@ -58,6 +58,7 @@
|
|||||||
* 20.06.2022 Permit setting the variable names used by -i by David Gow
|
* 20.06.2022 Permit setting the variable names used by -i by David Gow
|
||||||
* 31.08.2023 -R never/auto/always prints colored output
|
* 31.08.2023 -R never/auto/always prints colored output
|
||||||
* 06.10.2023 enable -r -b to reverse bit dumps
|
* 06.10.2023 enable -r -b to reverse bit dumps
|
||||||
|
* 12.01.2024 disable auto-conversion for z/OS (MVS)
|
||||||
*
|
*
|
||||||
* (c) 1990-1998 by Juergen Weigert (jnweiger@gmail.com)
|
* (c) 1990-1998 by Juergen Weigert (jnweiger@gmail.com)
|
||||||
*
|
*
|
||||||
@@ -138,7 +139,7 @@ extern void perror __P((char *));
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char version[] = "xxd 2023-10-25 by Juergen Weigert et al.";
|
char version[] = "xxd 2024-01-12 by Juergen Weigert et al.";
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char osver[] = " (Win32)";
|
char osver[] = " (Win32)";
|
||||||
#else
|
#else
|
||||||
@@ -587,7 +588,7 @@ begin_coloring_char (char *l, int *c, int e, int ebcdic)
|
|||||||
}
|
}
|
||||||
else /* ASCII */
|
else /* ASCII */
|
||||||
{
|
{
|
||||||
#ifdef __MVS__
|
#if defined(__MVS__) && __CHARSET_LIB == 0
|
||||||
if (e >= 64)
|
if (e >= 64)
|
||||||
l[(*c)++] = COLOR_GREEN;
|
l[(*c)++] = COLOR_GREEN;
|
||||||
#else
|
#else
|
||||||
@@ -905,6 +906,10 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
rewind(fpo);
|
rewind(fpo);
|
||||||
}
|
}
|
||||||
|
#ifdef __MVS__
|
||||||
|
// Disable auto-conversion on input file descriptors
|
||||||
|
__disableautocvt(fileno(fp));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (revert)
|
if (revert)
|
||||||
switch (hextype)
|
switch (hextype)
|
||||||
@@ -1066,7 +1071,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
COLOR_PROLOGUE
|
COLOR_PROLOGUE
|
||||||
begin_coloring_char(l,&c,e,ebcdic);
|
begin_coloring_char(l,&c,e,ebcdic);
|
||||||
#ifdef __MVS__
|
#if defined(__MVS__) && __CHARSET_LIB == 0
|
||||||
if (e >= 64)
|
if (e >= 64)
|
||||||
l[c++] = e;
|
l[c++] = e;
|
||||||
else
|
else
|
||||||
@@ -1094,7 +1099,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
c += addrlen + 3 + p;
|
c += addrlen + 3 + p;
|
||||||
l[c++] =
|
l[c++] =
|
||||||
#ifdef __MVS__
|
#if defined(__MVS__) && __CHARSET_LIB == 0
|
||||||
(e >= 64)
|
(e >= 64)
|
||||||
#else
|
#else
|
||||||
(e > 31 && e < 127)
|
(e > 31 && e < 127)
|
||||||
|
Reference in New Issue
Block a user