diff --git a/CHANGES b/CHANGES index 6ebb4b9..c81b958 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +New in release 1.4.1 +==================== + +* Minor fixes + + New in release 1.4.1rc ====================== diff --git a/README b/README index 58308ff..03c60c1 100644 --- a/README +++ b/README @@ -13,8 +13,8 @@ How to compile https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/ - gunzip -c bvi-1.4.1rc.src.tar.gz | tar xvf - - cd bvi-1.4.1rc + gunzip -c bvi-1.4.1.src.tar.gz | tar xvf - + cd bvi-1.4.1 ./configure make make install diff --git a/bm_unix.c b/bm_unix.c index 2c4df3b..dd5c92f 100644 --- a/bm_unix.c +++ b/bm_unix.c @@ -6,10 +6,11 @@ * 2003-07-04 V 1.3.2 * 2010-06-02 V 1.3.4 * 2013-08-22 V 1.4.0 + * 2019-10-09 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2013 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it diff --git a/bvi.c b/bvi.c index 5aa28cc..ec2ed33 100644 --- a/bvi.c +++ b/bvi.c @@ -12,7 +12,7 @@ * 2006-04-04 V 1.3.3 * 2013-08-23 V 1.4.0alpha * 2014-10-07 V 1.4.0 - * 2019-01-22 V 1.4.1 + * 2019-10-12 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * @@ -266,20 +266,18 @@ main(argc, argv) cbreak(); noecho(); - { - /* address column width */ - /* default is 8 + 2 blanks */ - /* if block_begin has 8 hex digits or more */ - /* reserve 1 hex digit more than required */ - char tmp[sizeof(block_begin) * 2 + 3]; - AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; - if (AnzAdd < 8) - AnzAdd = 8; - if (AnzAdd > sizeof(block_begin) * 2) - AnzAdd = sizeof(block_begin) * 2; - sprintf(addr_form, "%%0%dllX ", AnzAdd); - AnzAdd = sprintf(tmp, addr_form, block_begin); - } + /* address column width */ + /* default is 8 + 2 blanks */ + /* if block_begin has 8 hex digits or more */ + /* reserve 1 hex digit more than required */ + char tmp[sizeof(block_begin) * 2 + 3]; + AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; + if (AnzAdd < 8) + AnzAdd = 8; + if (AnzAdd > sizeof(block_begin) * 2) + AnzAdd = sizeof(block_begin) * 2; + sprintf(addr_form, "%%0%dllX ", AnzAdd); + AnzAdd = sprintf(tmp, addr_form, block_begin); Anzahl = ((COLS - AnzAdd - 1) / 16) * 4; P(P_CM) = Anzahl; @@ -310,6 +308,18 @@ main(argc, argv) current = (PTR)(pagepos + y * Anzahl + xpos()); if (wrstat) statpos(); wrstat = 1; + + repaint(); + if (x < (Anzahl3 + AnzAdd - 2)) + { + mvchgat(y, 7+Anzahl3+x/3, 1, A_REVERSE, 0, NULL); + } + else + { + mvchgat(y,(x-Anzahl3-10)*3+10,1,A_REVERSE,0,NULL); + mvchgat(y,(x-Anzahl3-10)*3+11,1,A_REVERSE,0,NULL); + } + setcur(); ch = vgetc(); while (ch >= '0' && ch <= '9') { diff --git a/comm.c b/comm.c index 457e9e4..6e0d884 100644 --- a/comm.c +++ b/comm.c @@ -807,7 +807,8 @@ outmsg(s) poi = s; while (*poi != '\0' && *poi != '@' && *poi != '|') { addch(*poi++); - cnt++; } + cnt++; + } } else { if (poi) poi++; else poi = s; @@ -821,6 +822,7 @@ outmsg(s) return cnt; } + /* If flag == TRUE we do a repaint * */ diff --git a/config.guess b/config.guess index a28a0c1..7f9ebbe 100644 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-01-01' +timestamp='2019-09-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -262,6 +262,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; @@ -271,12 +274,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -985,22 +991,50 @@ EOF exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1113,7 +1147,7 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -1297,38 +1331,39 @@ EOF echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; @@ -1433,6 +1468,143 @@ EOF exit ;; esac +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in @@ -1491,4 +1663,3 @@ exit 1 # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: - diff --git a/config.sub b/config.sub index adf5194..0f2234c 100644 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-01-01' +timestamp='2019-06-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -111,6 +111,7 @@ case $# in esac # Split fields of configuration type +# shellcheck disable=SC2162 IFS="-" read field1 field2 field3 field4 < maxpos) { strcpy(linbuf, "~ "); } else { @@ -585,14 +591,27 @@ printline(mempos, scpos) } if (mempos + print_pos >= maxpos) { sprintf(tmpbuf, " "); + addstr(tmpbuf); cur_ch = ' '; } else { cur_ch = *(mempos + print_pos); - sprintf(tmpbuf, "%02X ", cur_ch); + if (P(P_GC)) { + if ((hex_counter/P(P_GS))%2!=0) { + attron(COLOR_PAIR(1)); + } + else + { + attroff(COLOR_PAIR(1)); + } + } + sprintf(tmpbuf, "%02X ", cur_ch); + addstr(tmpbuf); + hex_counter++; + } strcat(linbuf, tmpbuf); } - mvaddstr(scpos, mv_pos, linbuf); + /*mvaddstr(scpos, mv_pos, linbuf);*/ attrset(A_NORMAL); for (print_pos = 0; print_pos < Anzahl; print_pos++) { @@ -615,6 +634,8 @@ printline(mempos, scpos) addstr("."); } } + } else { + addstr(" "); } } } diff --git a/patchlevel.h b/patchlevel.h index f29ec44..276f7ba 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.4.1rc" +#define VERSION "1.4.1" diff --git a/set.c b/set.c index 7f2707f..10daf10 100644 --- a/set.c +++ b/set.c @@ -58,6 +58,8 @@ struct param params[] = { { "wrapscan", "ws", TRUE, "", P_BOOL }, { "highlight", "hl", TRUE, "", P_BOOL }, { "reverse", "re", FALSE, "", P_BOOL }, + { "groupcolor", "gc", TRUE, "", P_BOOL }, + { "columnsgroup", "cg", 4, "", P_NUM }, #if defined(__MSDOS__) && !defined(DJGPP) { "color", "co", 7, "", P_NUM }, #endif diff --git a/set.h b/set.h index 8995296..94a8f9e 100644 --- a/set.h +++ b/set.h @@ -69,7 +69,9 @@ extern struct param params[]; #define P_WS 15 /* wrapscan */ #define P_HL 16 /* highlight search enabled */ #define P_RE 17 /* reverse video */ -#define P_CO 18 /* color/attribute setting */ +#define P_GC 18 /* Grouped Highlight hex */ +#define P_GS 19 /* Group lenght for highlight */ +#define P_CO 20 /* color/attribute setting */ /* * Macro to get the value of a parameter