mirror of
https://github.com/vbatts/bvi.git
synced 2025-07-31 14:40:27 +00:00
git ls-files | xargs sed -i 's/[ \t]*$//'
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
5ab3ef5609
commit
92a88a4b4b
18 changed files with 64 additions and 64 deletions
6
CHANGES
6
CHANGES
|
@ -1,9 +1,9 @@
|
|||
New in release 1.4.2
|
||||
====================
|
||||
This release is dedicated to Sven Guckes (*1967-04-06 +2022-02-20).
|
||||
Sven was an enthusiastic Linux explainer, his particular passion was the console tools.
|
||||
Sven was an enthusiastic Linux explainer, his particular passion was the console tools.
|
||||
I met Sven a couple of times. He always showed interest in the further development of
|
||||
the bvi and liked to discuss new ideas.
|
||||
the bvi and liked to discuss new ideas.
|
||||
R.I.P. Sven
|
||||
|
||||
* :wq bug fixed
|
||||
|
@ -29,7 +29,7 @@ New in release 1.4.1rc
|
|||
* Compile warning: implicit declaration of function ‘save_chk’ fixed (SF bug #9)
|
||||
* bmore seg fault on file not found fixed
|
||||
* set columns prevents filename display on the commandline fixed (SF bug #8)
|
||||
* bmore new option -r
|
||||
* bmore new option -r
|
||||
bvi new setting: set reverse
|
||||
Characters between 160 - 254 are displayed as "reverse video text" as used in
|
||||
some legacy systems (Atari, Commodore, Apple II, etc).
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
# Copyright (c) 1996-2022 by Gerhard Buergmann
|
||||
# gerhard@puon.at
|
||||
#
|
||||
#
|
||||
# 1996-01-18 V 1.0.0
|
||||
# 1999-01-15 V 1.1.0
|
||||
# 1999-03-03 V 1.1.1
|
||||
|
|
4
README
4
README
|
@ -9,7 +9,7 @@ and is distributed under the GPL (GNU Public License).
|
|||
How to compile
|
||||
==============
|
||||
|
||||
You need the curses (ncurses) library for cursor movement on your system.
|
||||
You need the curses (ncurses) library for cursor movement on your system.
|
||||
https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ Subscribe to the bvi mailing for support, updates and other news:
|
|||
|
||||
Send a blank email to bvi-subscribe@yahoogroups.com. You will receive a
|
||||
subscription confirmation message. Simply reply this message and your
|
||||
subscription will be complete.
|
||||
subscription will be complete.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
|
||||
#undef NEED_PUTC_CHAR
|
||||
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
|
|
|
@ -116,7 +116,7 @@ initterm()
|
|||
|
||||
no_intty = tcgetattr(fileno(stdin), &ostate);
|
||||
tcgetattr(fileno(stderr), &ostate);
|
||||
|
||||
|
||||
nstate = ostate;
|
||||
if (!no_tty) {
|
||||
ostate.c_lflag &= ~(ICANON|ECHO);
|
||||
|
|
2
bmore.1
2
bmore.1
|
@ -77,7 +77,7 @@ except that a header is printed before each file in a series.
|
|||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-a
|
||||
ASCII mode: no hex representation of the contents. Non printable
|
||||
ASCII mode: no hex representation of the contents. Non printable
|
||||
characters are displayed as a dot (.)
|
||||
.TP
|
||||
.B \-c
|
||||
|
|
22
bmore.c
22
bmore.c
|
@ -141,7 +141,7 @@ main(argc, argv)
|
|||
#endif
|
||||
|
||||
poi = strrchr(argv[0], DELIM);
|
||||
|
||||
|
||||
if (poi) strncpy(progname, ++poi, 9);
|
||||
else strncpy(progname, argv[0], 9);
|
||||
strtok(progname, ".");
|
||||
|
@ -177,7 +177,7 @@ main(argc, argv)
|
|||
break;
|
||||
case 'r': r_flag++;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
i++;
|
||||
|
@ -340,7 +340,7 @@ main(argc, argv)
|
|||
fclose(curr_file);
|
||||
reset_tty();
|
||||
exit(exval);
|
||||
case ':' :
|
||||
case ':' :
|
||||
switch (colon) {
|
||||
case 'f':
|
||||
prompt = 0;
|
||||
|
@ -449,7 +449,7 @@ main(argc, argv)
|
|||
bytepos = screen_home;
|
||||
to_print = maxy;
|
||||
break;
|
||||
case '\\':
|
||||
case '\\':
|
||||
if (ascii_flag) {
|
||||
bmbeep();
|
||||
break;
|
||||
|
@ -460,13 +460,13 @@ main(argc, argv)
|
|||
if (rdline(ch, sstring)) break;
|
||||
}
|
||||
case 'n': /**** Search Next ****/
|
||||
case 'N':
|
||||
case 'N':
|
||||
bmsearch(ch);
|
||||
/*
|
||||
to_print--;
|
||||
*/
|
||||
break;
|
||||
case '\'':
|
||||
case '\'':
|
||||
if (no_intty) {
|
||||
bmbeep();
|
||||
} else {
|
||||
|
@ -502,13 +502,13 @@ main(argc, argv)
|
|||
if (!no_intty) {
|
||||
cleartoeol();
|
||||
if (ch == 'v') {
|
||||
sprintf(string, "bvi +%lu %s",
|
||||
(unsigned long)(screen_home +
|
||||
sprintf(string, "bvi +%lu %s",
|
||||
(unsigned long)(screen_home +
|
||||
(maxy + 1) / 2 * out_len), name);
|
||||
} else {
|
||||
if (precount < 1) precount = bytepos - screen_home;
|
||||
sprintf(string, "bvi -b %lu -s %lu %s",
|
||||
(unsigned long)screen_home,
|
||||
(unsigned long)screen_home,
|
||||
(unsigned long)precount, name);
|
||||
}
|
||||
doshell(string);
|
||||
|
@ -656,7 +656,7 @@ putline(buf, num)
|
|||
}
|
||||
PRINTF(" ");
|
||||
}
|
||||
|
||||
|
||||
// ASCII section
|
||||
for (print_pos = 0; print_pos < num; print_pos++) {
|
||||
++bytepos;
|
||||
|
@ -695,7 +695,7 @@ printout(lns)
|
|||
int c, num;
|
||||
int doub = 0;
|
||||
static int flag;
|
||||
|
||||
|
||||
if (c_flag) {
|
||||
clearscreen();
|
||||
}
|
||||
|
|
2
bmore.h
2
bmore.h
|
@ -7,7 +7,7 @@
|
|||
* 1999-08-21 V 1.2.0 final
|
||||
* 2000-05-31 V 1.3.0 beta
|
||||
* 2000-10-04 V 1.3.0 final
|
||||
* 2002-01-16 V 1.3.1
|
||||
* 2002-01-16 V 1.3.1
|
||||
* 2003-02-20 V 1.3.2
|
||||
* 2010-03-28 V 1.3.4
|
||||
* 2019-01-22 V 1.4.1
|
||||
|
|
32
bvi.1
32
bvi.1
|
@ -79,9 +79,9 @@
|
|||
'br\}
|
||||
.\" If the F register is turned on, we'll generate
|
||||
.\" index entries out stderr for the following things:
|
||||
.\" TH Title
|
||||
.\" TH Title
|
||||
.\" SH Header
|
||||
.\" Sh Subsection
|
||||
.\" Sh Subsection
|
||||
.\" Ip Item
|
||||
.\" X<> Xref (embedded
|
||||
.\" Of course, you have to process the output yourself
|
||||
|
@ -203,10 +203,10 @@ bvi-1.4.1
|
|||
.IX Header "OPTIONS"
|
||||
.Ip "\fIfile\fR..." 4
|
||||
.IX Item "\fIfile\fR..."
|
||||
A list of filenames. The first one will be the current file and
|
||||
will be read
|
||||
A list of filenames. The first one will be the current file and
|
||||
will be read
|
||||
into the buffer. The cursor will be positioned on the first line of
|
||||
the buffer. You can get to the other files with the ":next" command.
|
||||
the buffer. You can get to the other files with the ":next" command.
|
||||
.Ip "\fB\-R\fR" 4
|
||||
.IX Item "\fB\-R\fR"
|
||||
\*(L"Readonly": The readonly flag is set for all the files,
|
||||
|
@ -261,7 +261,7 @@ The byte offset (extreme left), the hex pane (middle),
|
|||
and an ascii pane (right) which shows as printable characters
|
||||
those bytes in the hex pane.
|
||||
On an 80 column terminal there will be sixteen hex values
|
||||
and their ASCII values on each screen line.
|
||||
and their ASCII values on each screen line.
|
||||
Note that (as one would expect) the first byte has the offset \*(L'0\*(R' (zero).
|
||||
.PP
|
||||
You can toggle between the hex and ascii windows with the tab key (TAB).
|
||||
|
@ -270,7 +270,7 @@ position (offset) within the file.
|
|||
.PP
|
||||
No \*(L"lines\*(R" concept:
|
||||
Files are treated as one long stream of bytes. The characters
|
||||
\*(L"newline\*(R" and \*(L"carriage return\*(R" are not special, id est they
|
||||
\*(L"newline\*(R" and \*(L"carriage return\*(R" are not special, id est they
|
||||
never mark the end of lines. Therefore the lines on the screen do not
|
||||
represent lines in the usual way. Data is broken across screen lines
|
||||
arbitarily.
|
||||
|
@ -319,7 +319,7 @@ Spaces between hex value are optional, so searching
|
|||
for \*(L"6775636B6573\*(R" will find \*(L"guckes\*(R".
|
||||
.PP
|
||||
Changing the length of data (insertion, deletion) moves the data to other addresses;
|
||||
this is bad for many cases (eg. databases, program files) and is
|
||||
this is bad for many cases (eg. databases, program files) and is
|
||||
thus disabled by default. You can enable this commands by typing
|
||||
.PP
|
||||
\f(CW :set memmove\fR
|
||||
|
@ -334,11 +334,11 @@ Use ESC (escape) to cancel a partial (uncompleted) command.
|
|||
.PP
|
||||
Input Mode:
|
||||
.PP
|
||||
Input is treated as replacement of current characters or
|
||||
Input is treated as replacement of current characters or
|
||||
(after the end of the file) is appended
|
||||
to the current file. This mode is entered from command mode by
|
||||
typing one of \*(L'i\*(R', \*(L'I\*(R', \*(L'A\*(R', \*(L'r\*(R', or \*(L'R\*(R'.
|
||||
You can enter the characters from the keyboard (in the ASCII window) or
|
||||
You can enter the characters from the keyboard (in the ASCII window) or
|
||||
hexadecimal values (in the HEX window).
|
||||
Type TAB to switch between these two windows.
|
||||
Type ESC to finish the current input and return to command mode.
|
||||
|
@ -346,8 +346,8 @@ Type CTRL\-C to cancel current command abnormally.
|
|||
.PP
|
||||
Command line mode (Last Line Mode or : mode):
|
||||
.PP
|
||||
Similar to vi, this mode is entered by typing one of the
|
||||
characters
|
||||
Similar to vi, this mode is entered by typing one of the
|
||||
characters
|
||||
: / ? \e # !
|
||||
The command is terminated and executed by typing a carriage
|
||||
return; to cancel a partially typed command, type
|
||||
|
@ -439,10 +439,10 @@ used within the following description of commands.
|
|||
You can insert/append/change bytes in ASCII/binary/decimal/
|
||||
hexadecimal or octal representation. You can enter several
|
||||
(screen) lines of input. A line with only a period (.) in it
|
||||
will terminate the command. You must not type in values greater
|
||||
will terminate the command. You must not type in values greater
|
||||
than a byte value. This causes an abandonment of the command.
|
||||
Pressing the CR key does not insert a newline \- character into
|
||||
the file. If you use ASCII mode you can use the special characters
|
||||
the file. If you use ASCII mode you can use the special characters
|
||||
\en, \er, \et and \e0.
|
||||
.PP
|
||||
.Vb 3
|
||||
|
@ -507,7 +507,7 @@ the file. If you use ASCII mode you can use the special characters
|
|||
`\fIx\fR move cursor to mark \fIx\fR in HEX section
|
||||
\*(L'\*(R' move cursor to previous context in ASCII section
|
||||
`` move cursor to previous context in HEX section
|
||||
|
||||
|
||||
\fBLine positioning:\fR
|
||||
H jump to first line on screen ("top")
|
||||
L jump to last line on screen ("low")
|
||||
|
@ -583,7 +583,7 @@ the file. If you use ASCII mode you can use the special characters
|
|||
\& columns cm=16 on an 80 character wide terminal
|
||||
\& ignorecase noic Ignores letter case in searching
|
||||
\& magic nomagic Makes . [ * special in patterns
|
||||
\& memmove nomm enables insert and delete commands
|
||||
\& memmove nomm enables insert and delete commands
|
||||
\& offset of=0 adds an offset to the diplayed addresses
|
||||
\& readonly noro If set, write fails unless you use ! after command
|
||||
\& reverse nore display otherwise-printable characters with their
|
||||
|
|
16
bvi.c
16
bvi.c
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* 1996-02-28 V 1.0.0
|
||||
* 1999-01-27 V 1.1.0
|
||||
* 1999-04-22 V 1.1.1
|
||||
* 1999-04-22 V 1.1.1
|
||||
* 1999-07-01 V 1.2.0 beta
|
||||
* 1999-10-22 V 1.2.0 final
|
||||
* 2000-05-10 V 1.3.0 alpha
|
||||
|
@ -310,7 +310,7 @@ main(argc, argv)
|
|||
if (*cmdstr != '\0')
|
||||
docmdline(cmdstr);
|
||||
msg(fname_buf);
|
||||
|
||||
|
||||
/* main loop */
|
||||
do {
|
||||
setjmp(env);
|
||||
|
@ -491,9 +491,9 @@ main(argc, argv)
|
|||
break;
|
||||
case ';': do_ft(0, 0);
|
||||
break;
|
||||
case 'F':
|
||||
case 'f':
|
||||
case 't':
|
||||
case 'F':
|
||||
case 'f':
|
||||
case 't':
|
||||
case 'T': do_ft(ch, 0);
|
||||
break;
|
||||
case 'G': last_motion = current;
|
||||
|
@ -501,10 +501,10 @@ main(argc, argv)
|
|||
if ((precount < P(P_OF)) ||
|
||||
(precount - P(P_OF)) > (filesize - 1L)) {
|
||||
beep();
|
||||
} else {
|
||||
} else {
|
||||
setpage((PTR)(mem + precount - P(P_OF)));
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
setpage((PTR)(mem + filesize - 1L));
|
||||
}
|
||||
break;
|
||||
|
@ -1033,7 +1033,7 @@ range(ch)
|
|||
- (off_t)P(P_OF)) > (filesize - 1L)) {
|
||||
beep();
|
||||
return 0;
|
||||
} else {
|
||||
} else {
|
||||
if (mem + count < current) {
|
||||
return(mem + count - current);
|
||||
} else {
|
||||
|
|
4
comm.c
4
comm.c
|
@ -8,7 +8,7 @@
|
|||
* 1999-09-10 V 1.2.0 final
|
||||
* 2000-03-03 V 1.3.0 beta
|
||||
* 2000-07-15 V 1.3.0 final
|
||||
* 2001-10-10 V 1.3.1
|
||||
* 2001-10-10 V 1.3.1
|
||||
* 2003-07-04 V 1.3.2
|
||||
* 2005-08-17 V 1.3.3
|
||||
* 2010-06-02 V 1.3.4
|
||||
|
@ -286,7 +286,7 @@ docmdline(cmdline)
|
|||
if ((c_argv[c_argc] = strtok(cmd, " \t")) != NULL) c_argc++;
|
||||
while ((c_argv[c_argc] = strtok(NULL, " \t")) != NULL) c_argc++;
|
||||
|
||||
if (c_argc > 1) {
|
||||
if (c_argc > 1) {
|
||||
emsg(ambigous);
|
||||
return; }
|
||||
if (c_argc == 1) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#undef NEED_PUTC_CHAR
|
||||
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
|
12
edit.c
12
edit.c
|
@ -117,7 +117,7 @@ edit(mode)
|
|||
setcur();
|
||||
continue;
|
||||
}
|
||||
if (ch == KEY_BACKSPACE
|
||||
if (ch == KEY_BACKSPACE
|
||||
|| ch == ASCII_DEL
|
||||
|| ch == BVICTRL('H')) {
|
||||
if (count > 0) {
|
||||
|
@ -483,7 +483,7 @@ statpos()
|
|||
}
|
||||
}
|
||||
bin_val[8] = '\0';
|
||||
|
||||
|
||||
sprintf(string, "%08llX %s \\%03o 0x%02X %3d ",
|
||||
(long long)(bytepos + P(P_OF)), bin_val, Char1, Char1, Char1);
|
||||
attrset(A_BOLD);
|
||||
|
@ -788,8 +788,8 @@ fileinfo(fname)
|
|||
if (edits) strcat(string, "[Modified] ");
|
||||
if (filesize) {
|
||||
bytepos = (pagepos + y * Anzahl + xpos()) - mem + 1L;
|
||||
sprintf(fstatus, "byte %llu of %llu --%llu%%--",
|
||||
(unsigned long long)bytepos,
|
||||
sprintf(fstatus, "byte %llu of %llu --%llu%%--",
|
||||
(unsigned long long)bytepos,
|
||||
(unsigned long long)filesize,
|
||||
(unsigned long long)(bytepos * 100L / filesize));
|
||||
strcat(string, fstatus);
|
||||
|
@ -960,7 +960,7 @@ do_ins_chg(start, arg, mode)
|
|||
*(tempbuf + count++) = val;
|
||||
}
|
||||
} else {
|
||||
while (isspace(cmdstr[strlen(cmdstr) - 1]))
|
||||
while (isspace(cmdstr[strlen(cmdstr) - 1]))
|
||||
cmdstr[strlen(cmdstr) - 1] = '\0';
|
||||
while (*poi != '\0') {
|
||||
val = strtol(poi, &epoi, base);
|
||||
|
@ -1025,7 +1025,7 @@ do_mark(mark, addr)
|
|||
int mark;
|
||||
PTR addr;
|
||||
{
|
||||
if (mark < 'a' || mark > 'z' || current >= maxpos)
|
||||
if (mark < 'a' || mark > 'z' || current >= maxpos)
|
||||
return;
|
||||
markbuf[mark - 'a'] = addr;
|
||||
}
|
||||
|
|
4
io.c
4
io.c
|
@ -333,7 +333,7 @@ load(fname)
|
|||
}
|
||||
|
||||
|
||||
/* argument "dir" not used!
|
||||
/* argument "dir" not used!
|
||||
* Needed for DOS version only
|
||||
*/
|
||||
void
|
||||
|
@ -352,7 +352,7 @@ bvi_init(dir)
|
|||
docmdline(initstr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DJGPP
|
||||
strcpy(rcpath, "c:");
|
||||
strcpy(rcpath, dir);
|
||||
|
|
2
re.c
2
re.c
|
@ -32,7 +32,7 @@
|
|||
/* You cannot use a common regexp subroutine, because \0 is a regular
|
||||
* character in a binary string !
|
||||
*/
|
||||
|
||||
|
||||
#include "bvi.h"
|
||||
#include "set.h"
|
||||
|
||||
|
|
2
recomp.c
2
recomp.c
|
@ -26,7 +26,7 @@
|
|||
/* You cannot use a common regexp subroutine, because \0 is a regular
|
||||
* character in a binary string !
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "bvi.h"
|
||||
#include "set.h"
|
||||
|
|
12
set.c
12
set.c
|
@ -9,13 +9,13 @@
|
|||
* 1999-07-02 V 1.2.0 beta
|
||||
* 1999-08-14 V 1.2.0 final
|
||||
* 2000-07-15 V 1.3.0 final
|
||||
* 2001-10-10 V 1.3.1
|
||||
* 2001-10-10 V 1.3.1
|
||||
* 2003-07-03 V 1.3.2
|
||||
* 2010-06-02 V 1.2.4
|
||||
* 2014-09-30 V 1.4.0
|
||||
* 2019-01-22 V 1.4.1
|
||||
*
|
||||
* Copyright 1996-2019 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
|
||||
|
@ -289,13 +289,13 @@ do_logic(mode, str)
|
|||
b = a >> 8;
|
||||
a |= b;
|
||||
break;
|
||||
case RROTATE:
|
||||
case RROTATE:
|
||||
b = a << 8;
|
||||
a |= b;
|
||||
a >>= value;
|
||||
a >>= value;
|
||||
/*
|
||||
b = a << (8 - value);
|
||||
a >>= value;
|
||||
a >>= value;
|
||||
a |= b;
|
||||
*/
|
||||
break;
|
||||
|
@ -303,7 +303,7 @@ do_logic(mode, str)
|
|||
break;
|
||||
case OR: a |= value;
|
||||
break;
|
||||
case XOR:
|
||||
case XOR:
|
||||
case NOT: a ^= value;
|
||||
break;
|
||||
case NEG: a ^= value;
|
||||
|
|
BIN
testfile
BIN
testfile
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue