bvi-1.4.0.src.tar.gz
49
CHANGES
|
@ -1,3 +1,52 @@
|
||||||
|
New in release 1.4.0 (stable)
|
||||||
|
=============================
|
||||||
|
|
||||||
|
* Minor fixes
|
||||||
|
|
||||||
|
|
||||||
|
New in release 1.4.0rc2
|
||||||
|
=======================
|
||||||
|
|
||||||
|
* Ubuntu bug #252604 fixed
|
||||||
|
* set scroll fixed
|
||||||
|
* adding ASCII_DEL 0x7f for backspace
|
||||||
|
|
||||||
|
|
||||||
|
New in release 1.4.0rc
|
||||||
|
======================
|
||||||
|
|
||||||
|
* b B w W commands behave equally now (SF bug #5)
|
||||||
|
* .bvirc empty line bug fixed (SF bug #6)
|
||||||
|
* g-command bug fixed (SF bug #7)
|
||||||
|
* several minor fixes
|
||||||
|
|
||||||
|
|
||||||
|
New in release 1.4.0beta
|
||||||
|
========================
|
||||||
|
|
||||||
|
* ~ - bug fixed (by elo3456)
|
||||||
|
* debian bug #469704 fixed (bmore)
|
||||||
|
* debian bug #715687 fixed (bmore)
|
||||||
|
* red hat bug #925119 fixed
|
||||||
|
|
||||||
|
|
||||||
|
New in release 1.4.0alpha
|
||||||
|
==========================
|
||||||
|
|
||||||
|
* highlight search result (by David Kelley)
|
||||||
|
* Large File Support added (by Joe Hinteregger)
|
||||||
|
* binary representation of byte in status line
|
||||||
|
* command line options renamed for compability with hexdump
|
||||||
|
* Offset handling fixed (Bug item #3036881)
|
||||||
|
* noshowmode: fix length of statusline
|
||||||
|
* bmore: 'b' bug fixed (by Tatsuyoshi)
|
||||||
|
* ';' bug fixed (by Nathan Hougthon and Christian Weisgerber)
|
||||||
|
* ZZ write bug fixed (by Joe Hinteregger)
|
||||||
|
* Buffer overflow if terminal > 255 columns (by Richard Yao)
|
||||||
|
* configure fixed (by Richard Yao)
|
||||||
|
* ncurses with tinfo fixed (by Richard Yao)
|
||||||
|
|
||||||
|
|
||||||
New in release 1.3.2
|
New in release 1.3.2
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
|
17
CREDITS
|
@ -10,6 +10,19 @@ Nico Schmidt <Nico.Schmidt@ipk.fhg.de> r-bug fix
|
||||||
Steve Waltner <swaltner@lsil.com> Mac OS X support
|
Steve Waltner <swaltner@lsil.com> Mac OS X support
|
||||||
Andre Wobst <Andre.Wobst@Physik.Uni-Augsburg.de> AIX fixes
|
Andre Wobst <Andre.Wobst@Physik.Uni-Augsburg.de> AIX fixes
|
||||||
SimoN <simontdd@netzero.net> bmore: subshell support fixes, DJGPP support
|
SimoN <simontdd@netzero.net> bmore: subshell support fixes, DJGPP support
|
||||||
|
Alastair Thomas Parker <u4111504@anu.edu.au> binary representation in status
|
||||||
|
Tatsuyoshi <toyota@tatsuyoshi.net> bmore: 'b' bug fix
|
||||||
|
Nathan Hougthon <natex84@gmail.com> ';' - bug
|
||||||
|
Christian "naddy" Weisgerber <naddy@mips.rhein-neckar.de> ';' - bug
|
||||||
|
David Kelley <dskelley@gmail.com> Highlight patch, backspace patch
|
||||||
|
Markus Ewert <sarum90@gmail.com> Apple backspace
|
||||||
|
Michael Tautschnig <mt@devian.org> Conflicting declaration of 'precoint' fixed
|
||||||
|
Sebastian Kayser <> Offset handling fixed (Bug item #3036881)
|
||||||
|
Josef Hinteregger <joehtg@joehtg.co.at> ZZ write bug, lfs
|
||||||
|
Richard Yao <ryao@gentoo.org> Buffer overflow at terminals > 255, ncurses with tinfo, configure fixed
|
||||||
|
<elo3456@sbcglobal.net> ~ operator dumps core
|
||||||
|
Dave Keaton <davek@gmail.com> ASCII_DEL patch
|
||||||
|
|
||||||
|
|
||||||
Packages:
|
Packages:
|
||||||
Christian "naddy" Weisgerber <naddy@mips.rhein-neckar.de> Source RPM
|
Christian "naddy" Weisgerber <naddy@mips.rhein-neckar.de> Source RPM
|
||||||
|
@ -17,7 +30,9 @@ Christian Kurz <shorty@jupiter.rhein-neckar.de> Debian package
|
||||||
Stijn de Bekker <stijn@debekker.org> Debian package
|
Stijn de Bekker <stijn@debekker.org> Debian package
|
||||||
Troy Engel <tengel@sonic.net> i386 RPM package
|
Troy Engel <tengel@sonic.net> i386 RPM package
|
||||||
Thomas Steudten <thomas@steudten.com> RH alpha and x86 RPM package
|
Thomas Steudten <thomas@steudten.com> RH alpha and x86 RPM package
|
||||||
|
John M. Huddleston <jhudd@frii.com> Cygwin binaries
|
||||||
|
Sam Hocevar <sam+deb@zoy.org> Debian Packages
|
||||||
|
|
||||||
Doc:
|
Doc:
|
||||||
Sven Guckes <guckes@math.fu-berlin.de>
|
Sven Guckes <first-contact@guckes.net>
|
||||||
Ben <info@leedsnet.com>
|
Ben <info@leedsnet.com>
|
||||||
|
|
45
Makefile.in
|
@ -6,7 +6,7 @@
|
||||||
# "autoconf" program (constructs like "@foo@" will get replaced in the
|
# "autoconf" program (constructs like "@foo@" will get replaced in the
|
||||||
# actual Makefile.
|
# actual Makefile.
|
||||||
#
|
#
|
||||||
# Copyright (c) 1996-2003 by Gerhard Buergmann
|
# Copyright (c) 1996-2014 by Gerhard Buergmann
|
||||||
# gerhard@puon.at
|
# gerhard@puon.at
|
||||||
#
|
#
|
||||||
# 1996-01-18 V 1.0.0
|
# 1996-01-18 V 1.0.0
|
||||||
|
@ -16,28 +16,31 @@
|
||||||
# 2000-05-31 V 1.3.0 beta
|
# 2000-05-31 V 1.3.0 beta
|
||||||
# 2000-10-01 V 1.3.0 final
|
# 2000-10-01 V 1.3.0 final
|
||||||
# 2003-07-03 V 1.3.2
|
# 2003-07-03 V 1.3.2
|
||||||
|
# 2014-10-01 V 1.4.0
|
||||||
#
|
#
|
||||||
###############################################
|
###############################################
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
|
||||||
bindir = $(DESTDIR)@bindir@
|
bindir = $(DESTDIR)@bindir@
|
||||||
mandir = $(DESTDIR)@mandir@
|
mandir = $(DESTDIR)@mandir@
|
||||||
libdir = $(DESTDIR)@libdir@
|
libdir = $(DESTDIR)@libdir@
|
||||||
|
helpdir = $(DESTDIR)@datadir@/bvi
|
||||||
|
|
||||||
man1dir = $(mandir)/man1
|
man1dir = $(mandir)/man1
|
||||||
|
|
||||||
OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o
|
OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o
|
||||||
HEADER = bvi.h set.h
|
INCLUDES = bvi.h set.h
|
||||||
BMOBJ = bmore.o bm_unix.o recomp.o
|
BMOBJ = bmore.o bm_unix.o recomp.o
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CFLAGS = @CFLAGS@ @CPPFLAGS@
|
CFLAGS = @CFLAGS@ @CPPFLAGS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
LDFLAGS= @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,32 +51,32 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
|
||||||
all: bvi bmore
|
all: bvi bmore
|
||||||
|
|
||||||
bvi: $(OBJS)
|
bvi: $(OBJS) $(HEADER)
|
||||||
$(CC) $(LDFLAGS) -o bvi $(OBJS) $(LIBS)
|
$(CC) $(LDFLAGS) -o bvi $(OBJS) $(LIBS)
|
||||||
|
|
||||||
bmore: $(BMOBJ)
|
bmore: $(BMOBJ)
|
||||||
$(CC) $(LDFLAGS) -o bmore $(BMOBJ) $(LIBS)
|
$(CC) $(LDFLAGS) -o bmore $(BMOBJ) $(LIBS)
|
||||||
|
|
||||||
.c.o:
|
%.o: %.c $(INCLUDES)
|
||||||
$(CC) $(CFLAGS) $(DEFS) -c $<
|
$(CC) $(CFLAGS) $(DEFS) -c $<
|
||||||
|
|
||||||
bmore.o: bmore.c
|
bmore.o: bmore.c
|
||||||
$(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(libdir)/bmore.help\" -c $<
|
$(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(helpdir)/bmore.help\" -c $<
|
||||||
|
|
||||||
|
|
||||||
install: all installdirs
|
install: all installdirs
|
||||||
@echo "Installing bvi"
|
@echo "Installing bvi"
|
||||||
@$(INSTALL_DATA) bvi.1 bmore.1 $(man1dir)
|
@$(INSTALL_DATA) bvi.1 bmore.1 $(man1dir)
|
||||||
@$(INSTALL_PROGRAM) -s bvi $(bindir)
|
@$(INSTALL_PROGRAM) bvi $(bindir)
|
||||||
@$(INSTALL_PROGRAM) -s bmore $(bindir)
|
@$(INSTALL_PROGRAM) bmore $(bindir)
|
||||||
@$(INSTALL_DATA) bmore.help $(libdir)
|
@$(INSTALL_DATA) bmore.help $(helpdir)
|
||||||
@if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi
|
@if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi
|
||||||
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
|
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
|
||||||
@ln $(bindir)/bvi $(bindir)/bview
|
@ln $(bindir)/bvi $(bindir)/bview
|
||||||
@ln $(bindir)/bvi $(bindir)/bvedit
|
@ln $(bindir)/bvi $(bindir)/bvedit
|
||||||
|
|
||||||
installdirs:
|
installdirs:
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) $(man1dir)
|
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(helpdir) $(man1dir)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@echo "Uninstalling bvi"
|
@echo "Uninstalling bvi"
|
||||||
|
@ -81,7 +84,7 @@ uninstall:
|
||||||
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
|
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
|
||||||
@if [ -f $(bindir)/bvi ]; then rm $(bindir)/bvi; fi
|
@if [ -f $(bindir)/bvi ]; then rm $(bindir)/bvi; fi
|
||||||
@if [ -f $(bindir)/bmore ]; then rm $(bindir)/bmore; fi
|
@if [ -f $(bindir)/bmore ]; then rm $(bindir)/bmore; fi
|
||||||
@if [ -f $(libdir)/bmore.help ]; then rm $(libdir)/bmore.help; fi
|
@if [ -f $(helpdir)/bmore.help ]; then rm $(helpdir)/bmore.help; fi
|
||||||
@if [ -f $(man1dir)/bvi.1 ]; then rm $(man1dir)/bvi.1; fi
|
@if [ -f $(man1dir)/bvi.1 ]; then rm $(man1dir)/bvi.1; fi
|
||||||
@if [ -f $(man1dir)/bmore.1 ]; then rm $(man1dir)/bmore.1; fi
|
@if [ -f $(man1dir)/bmore.1 ]; then rm $(man1dir)/bmore.1; fi
|
||||||
|
|
||||||
|
|
4
README
|
@ -9,8 +9,8 @@ and is distributed under the GPL (GNU Public License).
|
||||||
How to compile
|
How to compile
|
||||||
==============
|
==============
|
||||||
|
|
||||||
gunzip -c bvi-1.3.2.tar.gz | tar xvf -
|
gunzip -c bvi-1.4.0.src.tar.gz | tar xvf -
|
||||||
cd bvi-1.3.2
|
cd bvi-1.4.0
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
BIN
bc/bvi/BVI.DSK
BIN
bc/bvi/BVI.PRJ
0
bm_dos.c
Executable file → Normal file
|
@ -4,10 +4,12 @@
|
||||||
* 2000-10-12 V 1.3.0 final
|
* 2000-10-12 V 1.3.0 final
|
||||||
* 2002-02-10 V 1.3.1
|
* 2002-02-10 V 1.3.1
|
||||||
* 2003-07-04 V 1.3.2
|
* 2003-07-04 V 1.3.2
|
||||||
|
* 2010-06-02 V 1.3.4
|
||||||
|
* 2013-08-22 V 1.4.0
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2013 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -156,6 +158,7 @@ void
|
||||||
doshell(cmd)
|
doshell(cmd)
|
||||||
char *cmd;
|
char *cmd;
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
#ifndef DJGPP
|
#ifndef DJGPP
|
||||||
char *getenv();
|
char *getenv();
|
||||||
char *shell;
|
char *shell;
|
||||||
|
@ -178,11 +181,11 @@ doshell(cmd)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
reset_tty();
|
reset_tty();
|
||||||
system(cmd);
|
ret = system(cmd);
|
||||||
set_tty();
|
set_tty();
|
||||||
printf("\r");
|
printf("\r");
|
||||||
home();
|
home();
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
fseeko(curr_file, screen_home, SEEK_SET);
|
||||||
bytepos = screen_home;
|
bytepos = screen_home;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
53
bmore.c
|
@ -6,10 +6,11 @@
|
||||||
* 2000-10-18 V 1.3.0 final
|
* 2000-10-18 V 1.3.0 final
|
||||||
* 2002-01-16 V 1.3.1
|
* 2002-01-16 V 1.3.1
|
||||||
* 2004-01-09 V 1.3.2
|
* 2004-01-09 V 1.3.2
|
||||||
|
* 2013-08-23 V 1.4.0
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1990-2004 by Gerhard Buergmann
|
* Copyright 1990-2013 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -47,7 +48,7 @@
|
||||||
|
|
||||||
#include "bmore.h"
|
#include "bmore.h"
|
||||||
|
|
||||||
char *copyright = "Copyright (C) 1990-2004 by Gerhard Buergmann";
|
char *copyright = "Copyright (C) 1990-2013 by Gerhard Buergmann";
|
||||||
|
|
||||||
int maxx, maxy;
|
int maxx, maxy;
|
||||||
int mymaxx = 0, mymaxy = 0;
|
int mymaxx = 0, mymaxy = 0;
|
||||||
|
@ -68,6 +69,7 @@ char numarr[64]; /* string for collecting number */
|
||||||
char addr_form[15];
|
char addr_form[15];
|
||||||
|
|
||||||
int ascii_flag = 0;
|
int ascii_flag = 0;
|
||||||
|
int dup_print_flag = 0;
|
||||||
int c_flag = 0, d_flag = 0;
|
int c_flag = 0, d_flag = 0;
|
||||||
int exval = 0;
|
int exval = 0;
|
||||||
int init_search = 0;
|
int init_search = 0;
|
||||||
|
@ -87,7 +89,8 @@ static int cnt = 0;
|
||||||
static int icnt = 0;
|
static int icnt = 0;
|
||||||
static int smode;
|
static int smode;
|
||||||
|
|
||||||
char search_pat[BUFFER]; /* / or ? command */
|
/* char search_pat[BUFFER]; */ /* / or ? command */
|
||||||
|
char bmore_search_pat[BUFFER]; /* / or ? command */
|
||||||
char *emptyclass = "Empty byte class '[]' or '[^]'";
|
char *emptyclass = "Empty byte class '[]' or '[^]'";
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,11 +185,7 @@ main(argc, argv)
|
||||||
init_search = argv[n][1];
|
init_search = argv[n][1];
|
||||||
strcpy(sstring, &argv[n][2]);
|
strcpy(sstring, &argv[n][2]);
|
||||||
} else {
|
} else {
|
||||||
if (argv[n][1] == '0') {
|
init_byte = strtoll(argv[n] + 1, NULL, 0);
|
||||||
init_byte = (off_t)strtol(argv[n] + 1, NULL, 16);
|
|
||||||
} else {
|
|
||||||
init_byte = (off_t)strtol(argv[n] + 1, NULL, 10);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
n++;
|
n++;
|
||||||
break;
|
break;
|
||||||
|
@ -221,7 +220,7 @@ main(argc, argv)
|
||||||
}
|
}
|
||||||
if (exval) {
|
if (exval) {
|
||||||
} else {
|
} else {
|
||||||
fseek(curr_file, init_byte, SEEK_SET);
|
fseeko(curr_file, init_byte, SEEK_SET);
|
||||||
bytepos += init_byte;
|
bytepos += init_byte;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +248,7 @@ main(argc, argv)
|
||||||
do_next(1);
|
do_next(1);
|
||||||
open_file(name);
|
open_file(name);
|
||||||
}
|
}
|
||||||
fclose(curr_file);
|
if (curr_file) fclose(curr_file);
|
||||||
reset_tty();
|
reset_tty();
|
||||||
exit(exval);
|
exit(exval);
|
||||||
}
|
}
|
||||||
|
@ -263,6 +262,7 @@ main(argc, argv)
|
||||||
/* main loop */
|
/* main loop */
|
||||||
do {
|
do {
|
||||||
to_print = 0;
|
to_print = 0;
|
||||||
|
dup_print_flag = 0;
|
||||||
if (prompt) {
|
if (prompt) {
|
||||||
if (prompt == 2) {
|
if (prompt == 2) {
|
||||||
while (open_file(name)) {
|
while (open_file(name)) {
|
||||||
|
@ -311,15 +311,18 @@ main(argc, argv)
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case ' ': /* Display next k lines of text [current screen size] */
|
case ' ': /* Display next k lines of text [current screen size] */
|
||||||
|
dup_print_flag = 1;
|
||||||
if (precount > 0) to_print = precount;
|
if (precount > 0) to_print = precount;
|
||||||
else to_print = maxy;
|
else to_print = maxy;
|
||||||
break;
|
break;
|
||||||
case 'z': /* Display next k lines of bytes [current screen size]* */
|
case 'z': /* Display next k lines of bytes [current screen size]* */
|
||||||
|
dup_print_flag = 1;
|
||||||
if (precount > 0) z_line = precount;
|
if (precount > 0) z_line = precount;
|
||||||
to_print = z_line;
|
to_print = z_line;
|
||||||
break;
|
break;
|
||||||
case '\r':
|
case '\r':
|
||||||
case '\n': /* Display next k lines of text [current screen size]* */
|
case '\n': /* Display next k lines of text [current screen size]* */
|
||||||
|
dup_print_flag = 1;
|
||||||
if (precount > 0) r_line = precount;
|
if (precount > 0) r_line = precount;
|
||||||
to_print = r_line;
|
to_print = r_line;
|
||||||
break;
|
break;
|
||||||
|
@ -394,7 +397,7 @@ main(argc, argv)
|
||||||
} else {
|
} else {
|
||||||
clearscreen();
|
clearscreen();
|
||||||
to_print = maxy + 1;
|
to_print = maxy + 1;
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
fseeko(curr_file, screen_home, SEEK_SET);
|
||||||
bytepos = screen_home;
|
bytepos = screen_home;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -412,7 +415,7 @@ main(argc, argv)
|
||||||
}
|
}
|
||||||
screen_home -= (maxy + 1) * out_len;
|
screen_home -= (maxy + 1) * out_len;
|
||||||
if (screen_home < 0) screen_home = 0;
|
if (screen_home < 0) screen_home = 0;
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
fseeko(curr_file, screen_home, SEEK_SET);
|
||||||
bytepos = screen_home;
|
bytepos = screen_home;
|
||||||
to_print = maxy + 1;
|
to_print = maxy + 1;
|
||||||
}
|
}
|
||||||
|
@ -434,7 +437,7 @@ main(argc, argv)
|
||||||
PRINTF("\r\n\r\n");
|
PRINTF("\r\n\r\n");
|
||||||
}
|
}
|
||||||
screen_home += (count + maxy) * out_len;
|
screen_home += (count + maxy) * out_len;
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
fseeko(curr_file, screen_home, SEEK_SET);
|
||||||
bytepos = screen_home;
|
bytepos = screen_home;
|
||||||
to_print = maxy;
|
to_print = maxy;
|
||||||
break;
|
break;
|
||||||
|
@ -460,7 +463,7 @@ main(argc, argv)
|
||||||
bmbeep();
|
bmbeep();
|
||||||
} else {
|
} else {
|
||||||
bytepos = last_search;
|
bytepos = last_search;
|
||||||
fseek(curr_file, bytepos, SEEK_SET);
|
fseeko(curr_file, bytepos, SEEK_SET);
|
||||||
screen_home = bytepos;
|
screen_home = bytepos;
|
||||||
to_print = maxy;
|
to_print = maxy;
|
||||||
PRINTF("\r");
|
PRINTF("\r");
|
||||||
|
@ -581,7 +584,7 @@ do_next(n)
|
||||||
{
|
{
|
||||||
if (numfiles) {
|
if (numfiles) {
|
||||||
if (n == 1 && file_nr == numfiles) {
|
if (n == 1 && file_nr == numfiles) {
|
||||||
fclose(curr_file);
|
if (curr_file) fclose(curr_file);
|
||||||
reset_tty();
|
reset_tty();
|
||||||
exit(exval);
|
exit(exval);
|
||||||
}
|
}
|
||||||
|
@ -595,7 +598,7 @@ do_next(n)
|
||||||
free(name);
|
free(name);
|
||||||
name = strdup(*(files + file_nr - 1));
|
name = strdup(*(files + file_nr - 1));
|
||||||
} else {
|
} else {
|
||||||
fclose(curr_file);
|
if (curr_file) fclose(curr_file);
|
||||||
reset_tty();
|
reset_tty();
|
||||||
exit(exval);
|
exit(exval);
|
||||||
}
|
}
|
||||||
|
@ -611,7 +614,7 @@ open_file(name)
|
||||||
if (stat(name, &buf) > -1) {
|
if (stat(name, &buf) > -1) {
|
||||||
filesize = buf.st_size;
|
filesize = buf.st_size;
|
||||||
}
|
}
|
||||||
if (curr_file != NULL) fclose(curr_file);
|
if (curr_file) fclose(curr_file);
|
||||||
if (numfiles > 1) do_header = 1;
|
if (numfiles > 1) do_header = 1;
|
||||||
if ((curr_file = fopen(name, "rb")) == NULL) {
|
if ((curr_file = fopen(name, "rb")) == NULL) {
|
||||||
perror(name);
|
perror(name);
|
||||||
|
@ -686,7 +689,7 @@ printout(lns)
|
||||||
buffer1[num] = c;
|
buffer1[num] = c;
|
||||||
}
|
}
|
||||||
if (!num) return 1;
|
if (!num) return 1;
|
||||||
if (memcmp(buffer1, buffer2, num) || !bytepos ) {
|
if (memcmp(buffer1, buffer2, num) || !bytepos || !dup_print_flag) {
|
||||||
memcpy(buffer2, buffer1, num);
|
memcpy(buffer2, buffer1, num);
|
||||||
putline(buffer2, num);
|
putline(buffer2, num);
|
||||||
if (!no_tty) flag = TRUE;
|
if (!no_tty) flag = TRUE;
|
||||||
|
@ -707,6 +710,7 @@ printout(lns)
|
||||||
if (screen_home < 0) screen_home = 0;
|
if (screen_home < 0) screen_home = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
dup_print_flag = 1;
|
||||||
} while(num);
|
} while(num);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -885,16 +889,19 @@ bmsearch(ch)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ch == '/') {
|
if (ch == '/') {
|
||||||
if (ascii_comp(search_pat, sstring)) return;
|
/* if (ascii_comp(search_pat, sstring)) return; */
|
||||||
|
if (ascii_comp(bmore_search_pat, sstring)) return;
|
||||||
}
|
}
|
||||||
if (ch == '\\') {
|
if (ch == '\\') {
|
||||||
if (hex_comp(search_pat, sstring)) return;
|
/* if (hex_comp(search_pat, sstring)) return; */
|
||||||
|
if (hex_comp(bmore_search_pat, sstring)) return;
|
||||||
}
|
}
|
||||||
oldpos = bytepos;
|
oldpos = bytepos;
|
||||||
last_search = screen_home;
|
last_search = screen_home;
|
||||||
if (precount < 1) precount = 1;
|
if (precount < 1) precount = 1;
|
||||||
while (precount--) {
|
while (precount--) {
|
||||||
while ((i = bmregexec(search_pat)) == 0);
|
/* while ((i = bmregexec(search_pat)) == 0); */
|
||||||
|
while ((i = bmregexec(bmore_search_pat)) == 0);
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
screen_home = bytepos;
|
screen_home = bytepos;
|
||||||
to_print = maxy;
|
to_print = maxy;
|
||||||
|
@ -909,7 +916,7 @@ emsg(string);
|
||||||
*/
|
*/
|
||||||
emsg("Pattern not found");
|
emsg("Pattern not found");
|
||||||
bytepos = oldpos;
|
bytepos = oldpos;
|
||||||
fseek(curr_file, bytepos, SEEK_SET);
|
fseeko(curr_file, bytepos, SEEK_SET);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -931,7 +938,7 @@ emsg(s)
|
||||||
putchar('\r');
|
putchar('\r');
|
||||||
cleartoeol();
|
cleartoeol();
|
||||||
highlight();
|
highlight();
|
||||||
PRINTF(s);
|
PRINTF("%s", s);
|
||||||
normal();
|
normal();
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
prompt = 0;
|
prompt = 0;
|
||||||
|
|
871
bmore.c.old
|
@ -1,871 +0,0 @@
|
||||||
/* BMORE - binary more
|
|
||||||
*
|
|
||||||
* 1990-01-31 V 1.0.0
|
|
||||||
* 1990-09-04 V 1.1.0
|
|
||||||
* 2000-05-31 V 1.3.0 beta
|
|
||||||
* 2000-10-18 V 1.3.0 final
|
|
||||||
* 2002-01-16 V 1.3.1
|
|
||||||
* 2002-02-22 V 1.3.2 line 576
|
|
||||||
*
|
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
|
||||||
*
|
|
||||||
* Copyright 1990-2003 by Gerhard Buergmann
|
|
||||||
* gerhard@puon.at
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the
|
|
||||||
* Free Software Foundation; either version 2, or (at your option) any
|
|
||||||
* later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* See file COPYING for information on distribution conditions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
|
||||||
# include <locale.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __MSDOS__
|
|
||||||
# define PRINTF cprintf
|
|
||||||
#else
|
|
||||||
# define PRINTF printf
|
|
||||||
#ifndef HELPFILE
|
|
||||||
# define HELPFILE "/usr/local/share/bmore.help"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "bmore.h"
|
|
||||||
|
|
||||||
char *copyright = "Copyright (C) 1990-2003 by Gerhard Buergmann";
|
|
||||||
|
|
||||||
int maxx, maxy;
|
|
||||||
char *name = NULL;
|
|
||||||
char sstring[MAXCMD] = ""; /* string for search */
|
|
||||||
char estring[MAXCMD] = ""; /* string for shell escape */
|
|
||||||
char string[MAXCMD];
|
|
||||||
FILE *curr_file = NULL, *help_file;
|
|
||||||
int AnzAdd;
|
|
||||||
long precount = -1; /* number preceding command */
|
|
||||||
|
|
||||||
char **files; /* list of input files */
|
|
||||||
int numfiles; /* number of input files */
|
|
||||||
int file_nr = 0; /* number of current input file */
|
|
||||||
|
|
||||||
int arrnum = 0;
|
|
||||||
char numarr[64]; /* string for collecting number */
|
|
||||||
char addr_form[15];
|
|
||||||
|
|
||||||
int ascii_flag = 0;
|
|
||||||
int d_flag = 0;
|
|
||||||
int init_search = 0;
|
|
||||||
char buffer1[MAXCMD], buffer2[MAXCMD];
|
|
||||||
int out_len;
|
|
||||||
int corr = 0, to_print;
|
|
||||||
off_t init_byte = 0;
|
|
||||||
off_t last_search = 0;
|
|
||||||
off_t screen_home, filesize;
|
|
||||||
off_t bytepos, oldpos;
|
|
||||||
int prompt = 1;
|
|
||||||
char helppath[MAXCMD];
|
|
||||||
|
|
||||||
static char *progname;
|
|
||||||
static char cmdbuf[MAXCMD];
|
|
||||||
static int cnt = 0;
|
|
||||||
static int icnt = 0;
|
|
||||||
static int smode;
|
|
||||||
|
|
||||||
char search_pat[BUFFER]; /* / or ? command */
|
|
||||||
char *emptyclass = "Empty byte class '[]' or '[^]'";
|
|
||||||
|
|
||||||
|
|
||||||
/* -a ASCII mode
|
|
||||||
* -d beginners mode
|
|
||||||
* -i ignore case
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Usage: %s [-adi] [+linenum | +/pattern] name1 name2 ...\n", progname);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{
|
|
||||||
int ch, ch1;
|
|
||||||
int colon = 0, last_ch = 0;
|
|
||||||
long last_pre = 0;
|
|
||||||
int lflag, repeat;
|
|
||||||
long count;
|
|
||||||
int i, n = 1;
|
|
||||||
int d_line, r_line, z_line;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __MSDOS__
|
|
||||||
char *poi;
|
|
||||||
|
|
||||||
strcpy(helppath, argv[0]);
|
|
||||||
poi = strrchr(helppath, '\\');
|
|
||||||
*poi = '\0';
|
|
||||||
strcat(helppath, "\\MORE.HLP");
|
|
||||||
#else
|
|
||||||
strncpy(helppath, HELPFILE, MAXCMD - 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
|
||||||
setlocale(LC_ALL, "");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
progname = argv[0];
|
|
||||||
|
|
||||||
while (n < argc) {
|
|
||||||
switch (argv[n][0]) {
|
|
||||||
case '-':
|
|
||||||
i = 1;
|
|
||||||
while (argv[n][i] != '\0') {
|
|
||||||
switch (argv[n][i]) {
|
|
||||||
case 'a': ascii_flag++;
|
|
||||||
break;
|
|
||||||
case 'd': d_flag++;
|
|
||||||
break;
|
|
||||||
case 'i': ignore_case++;
|
|
||||||
break;
|
|
||||||
default: usage();
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
n++;
|
|
||||||
break;
|
|
||||||
case '+': /* +cmd */
|
|
||||||
if (argv[n][1] == '/' || argv[n][1] == '\\') {
|
|
||||||
init_search = argv[n][1];
|
|
||||||
strcpy(sstring, &argv[n][2]);
|
|
||||||
} else {
|
|
||||||
if (argv[n][1] == '0') {
|
|
||||||
init_byte = (off_t)strtol(argv[n] + 1, NULL, 16);
|
|
||||||
} else {
|
|
||||||
init_byte = (off_t)strtol(argv[n] + 1, NULL, 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
n++;
|
|
||||||
break;
|
|
||||||
default: /* must be a file name */
|
|
||||||
name = strdup(argv[n]);
|
|
||||||
files = &(argv[n]);
|
|
||||||
numfiles = argc - n;
|
|
||||||
n = argc;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (numfiles == 0) {
|
|
||||||
curr_file = stdin;
|
|
||||||
if (isatty(fileno(stdin)) != 0) usage();
|
|
||||||
} else {
|
|
||||||
open_file(name);
|
|
||||||
file_nr = 1;
|
|
||||||
fseek(curr_file, init_byte, SEEK_SET);
|
|
||||||
bytepos += init_byte;
|
|
||||||
}
|
|
||||||
screen_home = bytepos;
|
|
||||||
|
|
||||||
initterm();
|
|
||||||
set_tty();
|
|
||||||
maxy -= 2;
|
|
||||||
z_line = maxy;
|
|
||||||
d_line = maxy / 2;
|
|
||||||
r_line = 1;
|
|
||||||
|
|
||||||
AnzAdd = 10;
|
|
||||||
strcpy(addr_form, "%08lX ");
|
|
||||||
|
|
||||||
if (ascii_flag)
|
|
||||||
out_len = ((maxx - AnzAdd - 1) / 4) * 4;
|
|
||||||
else
|
|
||||||
out_len = ((maxx - AnzAdd - 1) / 16) * 4;
|
|
||||||
|
|
||||||
if (init_search)
|
|
||||||
bmsearch(init_search);
|
|
||||||
|
|
||||||
if (no_tty) {
|
|
||||||
while(!printout(1));
|
|
||||||
fclose(curr_file);
|
|
||||||
reset_tty();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
if (printout(maxy)) {
|
|
||||||
do_next(1);
|
|
||||||
}
|
|
||||||
/* main loop */
|
|
||||||
do {
|
|
||||||
to_print = 0;
|
|
||||||
if (prompt) {
|
|
||||||
highvideo();
|
|
||||||
PRINTF("--More--");
|
|
||||||
if (prompt == 2) {
|
|
||||||
PRINTF("(Next file: %s)", name);
|
|
||||||
} else if (!no_intty && filesize) {
|
|
||||||
PRINTF("(%d%%)", (int)((bytepos * 100) / filesize));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (d_flag) PRINTF("[Press space to continue, 'q' to quit]");
|
|
||||||
normvideo();
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
ch = vgetc();
|
|
||||||
if (prompt == 2) {
|
|
||||||
open_file(name);
|
|
||||||
}
|
|
||||||
prompt = 1;
|
|
||||||
PRINTF("\r");
|
|
||||||
while (ch >= '0' && ch <= '9') {
|
|
||||||
numarr[arrnum++] = ch;
|
|
||||||
ch = vgetc();
|
|
||||||
}
|
|
||||||
numarr[arrnum] = '\0';
|
|
||||||
if (arrnum != 0) precount = strtol(numarr, (char **)NULL, 10);
|
|
||||||
else precount = -1;
|
|
||||||
lflag = arrnum = 0;
|
|
||||||
|
|
||||||
if (ch == '.') {
|
|
||||||
precount = last_pre;
|
|
||||||
ch = last_ch;
|
|
||||||
repeat = 1;
|
|
||||||
} else {
|
|
||||||
last_pre = precount;
|
|
||||||
last_ch = ch;
|
|
||||||
if (ch == ':') colon = vgetc();
|
|
||||||
repeat = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (ch) {
|
|
||||||
case ' ': /* Display next k lines of text [current screen size] */
|
|
||||||
if (precount > 0) to_print = precount;
|
|
||||||
else to_print = maxy;
|
|
||||||
break;
|
|
||||||
case 'z': /* Display next k lines of bytes [current screen size]* */
|
|
||||||
if (precount > 0) z_line = precount;
|
|
||||||
to_print = z_line;
|
|
||||||
break;
|
|
||||||
case '\r':
|
|
||||||
case '\n': /* Display next k lines of text [current screen size]* */
|
|
||||||
if (precount > 0) r_line = precount;
|
|
||||||
to_print = r_line;
|
|
||||||
break;
|
|
||||||
case 'q':
|
|
||||||
case 'Q':
|
|
||||||
clreol();
|
|
||||||
fclose(curr_file);
|
|
||||||
reset_tty();
|
|
||||||
exit(0);
|
|
||||||
case ':' :
|
|
||||||
switch (colon) {
|
|
||||||
case 'f':
|
|
||||||
prompt = 0;
|
|
||||||
if (!no_intty)
|
|
||||||
PRINTF("\"%s\" line %lu", name,
|
|
||||||
(unsigned long)(bytepos - out_len));
|
|
||||||
else
|
|
||||||
PRINTF("[Not a file] line %lu",
|
|
||||||
(unsigned long)(bytepos - out_len));
|
|
||||||
fflush(stdout);
|
|
||||||
break;
|
|
||||||
case 'n':
|
|
||||||
if (precount < 1) precount = 1;
|
|
||||||
do_next(precount);
|
|
||||||
PRINTF("\r");
|
|
||||||
clreol();
|
|
||||||
PRINTF("\n...Skipping to file %s\r\n\r\n", name);
|
|
||||||
prompt = 2;
|
|
||||||
break;
|
|
||||||
case 'p':
|
|
||||||
if (precount < 1) precount = 1;
|
|
||||||
do_next(-precount);
|
|
||||||
PRINTF("\r");
|
|
||||||
clreol();
|
|
||||||
PRINTF("\n...Skipping back to file %s\r\n\r\n", name);
|
|
||||||
prompt = 2;
|
|
||||||
break;
|
|
||||||
case 'q':
|
|
||||||
clreol();
|
|
||||||
fclose(curr_file);
|
|
||||||
reset_tty();
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
case '!':
|
|
||||||
if (!no_intty) {
|
|
||||||
clreol();
|
|
||||||
if (rdline(colon, estring)) break;
|
|
||||||
doshell(estring);
|
|
||||||
PRINTF("------------------------\r\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
bmbeep();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '!':
|
|
||||||
if (!no_intty) {
|
|
||||||
clreol();
|
|
||||||
if (rdline(ch, estring)) break;
|
|
||||||
doshell(estring);
|
|
||||||
PRINTF("------------------------\r\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'd': /* Scroll k lines [current scroll size, initially 11]* */
|
|
||||||
case BVICTRL('D'):
|
|
||||||
if (precount > 0) d_line = precount;
|
|
||||||
to_print = d_line;
|
|
||||||
break;
|
|
||||||
case BVICTRL('L'): /*** REDRAW SCREEN ***/
|
|
||||||
if (no_intty) {
|
|
||||||
bmbeep();
|
|
||||||
} else {
|
|
||||||
clrscr();
|
|
||||||
to_print = maxy + 1;
|
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
|
||||||
bytepos = screen_home;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'b': /* Skip backwards k screenfuls of text [1] */
|
|
||||||
case BVICTRL('B'):
|
|
||||||
if (no_intty) {
|
|
||||||
bmbeep();
|
|
||||||
} else {
|
|
||||||
if (precount < 1) precount = 1;
|
|
||||||
PRINTF("...back %ld page", precount);
|
|
||||||
if (precount > 1) {
|
|
||||||
PRINTF("s\r\n");
|
|
||||||
} else {
|
|
||||||
PRINTF("\r\n");
|
|
||||||
}
|
|
||||||
screen_home -= (maxy + 1) * out_len;
|
|
||||||
if (screen_home < 0) screen_home = 0;
|
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
|
||||||
bytepos = screen_home;
|
|
||||||
to_print = maxy + 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'f': /* Skip forward k screenfuls of bytes [1] */
|
|
||||||
case 's': /* Skip forward k lines of bytes [1] */
|
|
||||||
if (precount < 1) precount = 1;
|
|
||||||
if (ch == 'f') {
|
|
||||||
count = maxy * precount;
|
|
||||||
} else {
|
|
||||||
count = precount;
|
|
||||||
}
|
|
||||||
putchar('\r');
|
|
||||||
clreol();
|
|
||||||
PRINTF("\n...skipping %ld line", count);
|
|
||||||
if (count > 1) {
|
|
||||||
PRINTF("s\r\n\r\n");
|
|
||||||
} else {
|
|
||||||
PRINTF("\r\n\r\n");
|
|
||||||
}
|
|
||||||
screen_home += (count + maxy) * out_len;
|
|
||||||
fseek(curr_file, screen_home, SEEK_SET);
|
|
||||||
bytepos = screen_home;
|
|
||||||
to_print = maxy;
|
|
||||||
break;
|
|
||||||
case '\\':
|
|
||||||
if (ascii_flag) {
|
|
||||||
bmbeep();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case '/': /**** Search String ****/
|
|
||||||
if (!repeat) {
|
|
||||||
clreol();
|
|
||||||
if (rdline(ch, sstring)) break;
|
|
||||||
}
|
|
||||||
case 'n': /**** Search Next ****/
|
|
||||||
case 'N':
|
|
||||||
bmsearch(ch);
|
|
||||||
/*
|
|
||||||
to_print--;
|
|
||||||
*/
|
|
||||||
break;
|
|
||||||
case '\'':
|
|
||||||
if (no_intty) {
|
|
||||||
bmbeep();
|
|
||||||
} else {
|
|
||||||
bytepos = last_search;
|
|
||||||
fseek(curr_file, bytepos, SEEK_SET);
|
|
||||||
screen_home = bytepos;
|
|
||||||
to_print = maxy;
|
|
||||||
PRINTF("\r");
|
|
||||||
clreol();
|
|
||||||
PRINTF("\n\r\n***Back***\r\n\r\n");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '=':
|
|
||||||
prompt = 0;
|
|
||||||
clreol();
|
|
||||||
PRINTF("%lX hex %lu dec", (unsigned long)bytepos,
|
|
||||||
(unsigned long)bytepos);
|
|
||||||
fflush(stdout);
|
|
||||||
break;
|
|
||||||
case '?':
|
|
||||||
case 'h':
|
|
||||||
if ((help_file = fopen(helppath, "r")) == NULL) {
|
|
||||||
emsg("Can't open help file");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while ((ch1 = getc(help_file)) != EOF)
|
|
||||||
putchar(ch1);
|
|
||||||
fclose(help_file);
|
|
||||||
to_print = 0;
|
|
||||||
break;
|
|
||||||
case 'w':
|
|
||||||
case 'v':
|
|
||||||
if (!no_intty) {
|
|
||||||
clreol();
|
|
||||||
if (ch == 'v') {
|
|
||||||
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)precount, name);
|
|
||||||
}
|
|
||||||
doshell(string);
|
|
||||||
to_print = maxy + 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
if (d_flag) {
|
|
||||||
emsg("[Press 'h' for instructions.]");
|
|
||||||
} else {
|
|
||||||
bmbeep();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (to_print) {
|
|
||||||
if (printout(to_print)) {
|
|
||||||
do_next(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
rdline(ch, sstring)
|
|
||||||
int ch;
|
|
||||||
char *sstring;
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
int ch1 = 0;
|
|
||||||
char bstring[MAXCMD];
|
|
||||||
|
|
||||||
if (ch == '!') {
|
|
||||||
strcpy(bstring, sstring);
|
|
||||||
sstring[0] = '\0';
|
|
||||||
}
|
|
||||||
putchar(ch);
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
while (i < MAXCMD) {
|
|
||||||
ch1 = vgetc();
|
|
||||||
if (ch1 == '\n' || ch1 == '\r' || ch1 == ESC) {
|
|
||||||
break;
|
|
||||||
} else if (ch1 == 8) {
|
|
||||||
if (i) {
|
|
||||||
sstring[--i] = '\0';
|
|
||||||
PRINTF("\r%c%s", ch, sstring);
|
|
||||||
clreol();
|
|
||||||
} else {
|
|
||||||
ch1 = ESC;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (ch1 == '!' && i == 0) {
|
|
||||||
if (bstring[0] == '\0') {
|
|
||||||
emsg("No previous command");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
putchar(ch1);
|
|
||||||
PRINTF("\r%c%s", ch, bstring);
|
|
||||||
strcat(sstring, bstring);
|
|
||||||
i = strlen(sstring);
|
|
||||||
} else {
|
|
||||||
putchar(ch1);
|
|
||||||
sstring[i++] = ch1;
|
|
||||||
}
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
if (ch1 == ESC) {
|
|
||||||
putchar('\r');
|
|
||||||
clreol();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (i) sstring[i] = '\0';
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
do_next(n)
|
|
||||||
int n;
|
|
||||||
{
|
|
||||||
if (numfiles) {
|
|
||||||
if (n == 1 && file_nr == numfiles) {
|
|
||||||
fclose(curr_file);
|
|
||||||
reset_tty();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
if ((file_nr + n) > numfiles)
|
|
||||||
file_nr = numfiles;
|
|
||||||
else if ((file_nr + n) < 1)
|
|
||||||
file_nr = 1;
|
|
||||||
else
|
|
||||||
file_nr += n;
|
|
||||||
prompt = 2;
|
|
||||||
free(name);
|
|
||||||
name = strdup(*(files + file_nr - 1));
|
|
||||||
} else {
|
|
||||||
fclose(curr_file);
|
|
||||||
reset_tty();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
open_file(name)
|
|
||||||
char *name;
|
|
||||||
{
|
|
||||||
struct stat buf;
|
|
||||||
|
|
||||||
if (stat(name, &buf) > -1) {
|
|
||||||
filesize = buf.st_size;
|
|
||||||
}
|
|
||||||
if (numfiles > 1) {
|
|
||||||
PRINTF("\r");
|
|
||||||
clreol();
|
|
||||||
PRINTF("\n::::::::::::::\r\n%s\r\n::::::::::::::\r\n", name);
|
|
||||||
corr = 2;
|
|
||||||
}
|
|
||||||
if (curr_file != NULL) fclose(curr_file);
|
|
||||||
if ((curr_file = fopen(name, "rb")) == NULL) {
|
|
||||||
/* reset_tty(); */
|
|
||||||
perror(name);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
bytepos = screen_home = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
putline(buf, num)
|
|
||||||
char *buf;
|
|
||||||
int num;
|
|
||||||
{
|
|
||||||
int print_pos;
|
|
||||||
unsigned char ch;
|
|
||||||
|
|
||||||
PRINTF(addr_form, (unsigned long)bytepos);
|
|
||||||
for (print_pos = 0; print_pos < num; print_pos++) {
|
|
||||||
ch = buf[print_pos];
|
|
||||||
if (!ascii_flag) {
|
|
||||||
PRINTF("%02X ", ch);
|
|
||||||
}
|
|
||||||
++bytepos;
|
|
||||||
if ((ch > 31) && (ch < 127))
|
|
||||||
*(string + print_pos) = ch;
|
|
||||||
else
|
|
||||||
*(string + print_pos) = '.';
|
|
||||||
}
|
|
||||||
for (; print_pos < out_len; print_pos++) {
|
|
||||||
if (!ascii_flag) {
|
|
||||||
PRINTF(" ");
|
|
||||||
}
|
|
||||||
++bytepos;
|
|
||||||
*(string + print_pos) = ' ';
|
|
||||||
}
|
|
||||||
*(string + num) = '\0';
|
|
||||||
PRINTF("%s\r\n", string);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
printout(lns)
|
|
||||||
int lns;
|
|
||||||
{
|
|
||||||
int c, num;
|
|
||||||
int doub = 0;
|
|
||||||
static int flag;
|
|
||||||
|
|
||||||
if (corr && (lns > maxy - 2)) lns -= corr;
|
|
||||||
corr = 0;
|
|
||||||
do {
|
|
||||||
for (num = 0; num < out_len; num++) {
|
|
||||||
if ((c = nextchar()) == -1) break;
|
|
||||||
buffer1[num] = c;
|
|
||||||
}
|
|
||||||
if (!num) return 1;
|
|
||||||
if (memcmp(buffer1, buffer2, num) || !bytepos ) {
|
|
||||||
memcpy(buffer2, buffer1, num);
|
|
||||||
putline(buffer2, num);
|
|
||||||
if (!no_tty) flag = TRUE;
|
|
||||||
lns--;
|
|
||||||
} else {
|
|
||||||
if (flag) {
|
|
||||||
clreol();
|
|
||||||
PRINTF("*\r\n");
|
|
||||||
lns--;
|
|
||||||
} else {
|
|
||||||
doub++;
|
|
||||||
}
|
|
||||||
flag = FALSE;
|
|
||||||
bytepos += num;
|
|
||||||
}
|
|
||||||
if (lns == 0) {
|
|
||||||
screen_home = bytepos - ((maxy + 1 + doub) * out_len);
|
|
||||||
if (screen_home < 0) screen_home = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} while(num);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
nextchar()
|
|
||||||
{
|
|
||||||
if (cnt == 0) return fgetc(curr_file);
|
|
||||||
cnt--;
|
|
||||||
return cmdbuf[icnt++] & 0xff;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
pushback(n, where)
|
|
||||||
int n;
|
|
||||||
char *where;
|
|
||||||
{
|
|
||||||
if (cnt) memmove(cmdbuf + n, cmdbuf, n);
|
|
||||||
memcpy(cmdbuf, where, n);
|
|
||||||
icnt = 0;
|
|
||||||
cnt += n;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Return:
|
|
||||||
* -1 EOF
|
|
||||||
* 0 not found at current position
|
|
||||||
* 1 found
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
bmregexec(scan)
|
|
||||||
char *scan;
|
|
||||||
{
|
|
||||||
char *act;
|
|
||||||
int count, test;
|
|
||||||
int l;
|
|
||||||
char act_pat[MAXCMD]; /* found pattern */
|
|
||||||
|
|
||||||
act = act_pat;
|
|
||||||
l = 0;
|
|
||||||
while (*scan != 0) {
|
|
||||||
if ((test = nextchar()) == -1) return -1;
|
|
||||||
*act++ = test;
|
|
||||||
if (++l == MAXCMD) {
|
|
||||||
pushback(l, act_pat);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (ignore_case && smode == ASCII) test = toupper(test);
|
|
||||||
switch (*scan++) {
|
|
||||||
case ONE: /* exactly one character */
|
|
||||||
count = *scan++;
|
|
||||||
if (count == 1) {
|
|
||||||
if (test != *scan) {
|
|
||||||
bytepos++;
|
|
||||||
if (l > 1) pushback(--l, act_pat + 1);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
scan++;
|
|
||||||
} else if (count > 1) {
|
|
||||||
if (sbracket(test, scan, count)) {
|
|
||||||
bytepos++;
|
|
||||||
if (l > 1) pushback(--l, act_pat + 1);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
scan += count;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case STAR: /* zero or more characters */
|
|
||||||
count = *scan++;
|
|
||||||
if (count == 1) { /* only one character, 0 - n times */
|
|
||||||
while (test == *scan) {
|
|
||||||
if ((test = nextchar()) == -1) return -2;
|
|
||||||
*act++ = test;
|
|
||||||
if (++l == MAXCMD) {
|
|
||||||
pushback(l, act_pat);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (ignore_case && smode == ASCII)
|
|
||||||
test = toupper(test);
|
|
||||||
}
|
|
||||||
pushback(1, --act);
|
|
||||||
l--;
|
|
||||||
scan++;
|
|
||||||
} else if (count > 1) { /* characters in bracket */
|
|
||||||
if (*scan == '^') {
|
|
||||||
do {
|
|
||||||
/* If we found something matching the next part of the expression, we
|
|
||||||
* abandon the search for not-matching characters. */
|
|
||||||
if (bmregexec(scan + count)) {
|
|
||||||
*act++ = test; /* May be wrong case !! */
|
|
||||||
l++;
|
|
||||||
scan += count;
|
|
||||||
bytepos--;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (sbracket(test, scan, count)) {
|
|
||||||
bytepos++;
|
|
||||||
if (l > 1) pushback(--l, act_pat + 1);
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
if ((test = nextchar()) == -1) return -3;
|
|
||||||
*act++ = test;
|
|
||||||
if (++l == MAXCMD) {
|
|
||||||
pushback(l, act_pat);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (ignore_case && smode == ASCII)
|
|
||||||
test = toupper(test);
|
|
||||||
}
|
|
||||||
} while(1);
|
|
||||||
} else {
|
|
||||||
while(!sbracket(test, scan, count)) {
|
|
||||||
if ((test = nextchar()) == -1) return -4;
|
|
||||||
*act++ = test;
|
|
||||||
if (++l == MAXCMD) {
|
|
||||||
pushback(l, act_pat);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (ignore_case && smode == ASCII)
|
|
||||||
test = toupper(test);
|
|
||||||
}
|
|
||||||
scan += count;
|
|
||||||
pushback(1, --act);
|
|
||||||
l--;
|
|
||||||
}
|
|
||||||
} else { /* ".*" */
|
|
||||||
do {
|
|
||||||
if ((test = nextchar()) == -1) return -5;
|
|
||||||
*act++ = test;
|
|
||||||
if (++l == MAXCMD) {
|
|
||||||
pushback(l, act_pat);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
pushback(1, act - 1);
|
|
||||||
bytepos--;
|
|
||||||
} while (bmregexec(scan) == 0);
|
|
||||||
bytepos++;
|
|
||||||
act--;
|
|
||||||
l--;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pushback(l, act_pat);
|
|
||||||
return 1; /* found */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
sbracket(start, scan, count)
|
|
||||||
int start;
|
|
||||||
char *scan;
|
|
||||||
int count;
|
|
||||||
{
|
|
||||||
if (*scan++ == '^') {
|
|
||||||
if (!memchr(scan, start, --count)) return 0;
|
|
||||||
} else {
|
|
||||||
if (memchr(scan, start, --count)) return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
bmsearch(ch)
|
|
||||||
int ch;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (sstring[0] == '\0') {
|
|
||||||
emsg("No previous regular expression");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (ch == '/') {
|
|
||||||
if (ascii_comp(search_pat, sstring)) return;
|
|
||||||
}
|
|
||||||
if (ch == '\\') {
|
|
||||||
if (hex_comp(search_pat, sstring)) return;
|
|
||||||
}
|
|
||||||
oldpos = bytepos;
|
|
||||||
last_search = screen_home;
|
|
||||||
if (precount < 1) precount = 1;
|
|
||||||
while (precount--) {
|
|
||||||
while ((i = bmregexec(search_pat)) == 0);
|
|
||||||
if (i == 1) {
|
|
||||||
screen_home = bytepos;
|
|
||||||
to_print = maxy;
|
|
||||||
} else { /* i == -1 -> EOF */
|
|
||||||
if (no_intty) {
|
|
||||||
PRINTF("\r\nPattern not found\r\n");
|
|
||||||
do_next(1);
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
sprintf(string, "Pattern not found %d - %ul", i, (unsigned long)bytepos);
|
|
||||||
emsg(string);
|
|
||||||
*/
|
|
||||||
emsg("Pattern not found");
|
|
||||||
bytepos = oldpos;
|
|
||||||
fseek(curr_file, bytepos, SEEK_SET);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (precount) {
|
|
||||||
nextchar();
|
|
||||||
bytepos++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (prompt) {
|
|
||||||
PRINTF("\r\n...skipping\r\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
emsg(s)
|
|
||||||
char *s;
|
|
||||||
{
|
|
||||||
putchar('\r');
|
|
||||||
clreol();
|
|
||||||
highvideo();
|
|
||||||
PRINTF(s);
|
|
||||||
normvideo();
|
|
||||||
fflush(stdout);
|
|
||||||
prompt = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
bmbeep() {
|
|
||||||
putchar(7);
|
|
||||||
}
|
|
5
bmore.h
|
@ -9,10 +9,11 @@
|
||||||
* 2000-10-04 V 1.3.0 final
|
* 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
|
* 2003-02-20 V 1.3.2
|
||||||
|
* 2010-03-28 V 1.3.4
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2010 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -57,6 +58,8 @@
|
||||||
# else
|
# else
|
||||||
# if HAVE_NCURSES_TERM_H
|
# if HAVE_NCURSES_TERM_H
|
||||||
# include <ncurses/term.h>
|
# include <ncurses/term.h>
|
||||||
|
# else
|
||||||
|
# include <term.h>
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
178
bmore.man
|
@ -1,178 +0,0 @@
|
||||||
BMORE(1) BMORE(1)
|
|
||||||
|
|
||||||
|
|
||||||
NAME
|
|
||||||
bmore - browse through a binary file
|
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
bmore [ -acdi ] [ -n lines ] [ -w cols ] [ +linenumber ] [
|
|
||||||
+/ASCII-pattern ] [ +\Hex-pattern ] [ filename ... ]
|
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
more is a filter that displays the contents of a binary
|
|
||||||
file on the terminal, one screenful at a time. It nor-
|
|
||||||
mally pauses after each screenful, and prints --More-- at
|
|
||||||
the bottom of the screen. bmore provides a two-line over-
|
|
||||||
lap between screens for continuity. If bmore is reading
|
|
||||||
from a file rather than a pipe, the percentage of charac-
|
|
||||||
ters displayed so far is also shown.
|
|
||||||
|
|
||||||
bmore scrolls up to display one more screen line in
|
|
||||||
response to a RETURN character; it displays another
|
|
||||||
screenful in response to a SPACE character. Other com-
|
|
||||||
mands are listed below.
|
|
||||||
|
|
||||||
The screen is divided in three sections or panes: 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. Note that (as one would expect) the first
|
|
||||||
byte has the offset 0 (zero).
|
|
||||||
|
|
||||||
bmore sets the terminal to noecho mode, so that the output
|
|
||||||
can be continuous. Commands that you type do not normally
|
|
||||||
show up on your terminal, except for the / , \ and ! com-
|
|
||||||
mands.
|
|
||||||
|
|
||||||
If the standard output is not a terminal, more acts just
|
|
||||||
like cat(1V), except that a header is printed before each
|
|
||||||
file in a series.
|
|
||||||
|
|
||||||
OPTIONS
|
|
||||||
-a ASCII mode: no hex representation of the contents.
|
|
||||||
Non printable characters are displayed as a dot (.)
|
|
||||||
|
|
||||||
-c Clear before displaying. Redrawing the screen
|
|
||||||
instead of scrolling.
|
|
||||||
|
|
||||||
-d Display error messages rather than ringing the ter-
|
|
||||||
minal bell if an unrecognized command is used.
|
|
||||||
This is helpful for inexperienced users.
|
|
||||||
|
|
||||||
-i Ignore case for searching.
|
|
||||||
|
|
||||||
-n lines
|
|
||||||
Displays the indicated number of lines in each
|
|
||||||
screenful, rather than the default (the number of
|
|
||||||
lines in the terminal screen less two).
|
|
||||||
|
|
||||||
-w cols
|
|
||||||
Display number of cols in each line.
|
|
||||||
|
|
||||||
+linenumber
|
|
||||||
Start up at linenumber.
|
|
||||||
|
|
||||||
+/ASCII-pattern
|
|
||||||
Start up at the line containing the regular expres-
|
|
||||||
sion pattern. Note: unlike editors, this construct
|
|
||||||
should not end with a `/'. If it does, then the
|
|
||||||
trailing slash is taken as a character in the
|
|
||||||
search pattern.
|
|
||||||
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
|
|
||||||
Commands
|
|
||||||
The commands take effect immediately; it is not necessary
|
|
||||||
to type a carriage return. Up to the time when the com-
|
|
||||||
mand character itself is given, the user may type the line
|
|
||||||
kill character to cancel the numerical argument being
|
|
||||||
formed. In addition, the user may type the erase charac-
|
|
||||||
ter to redisplay the `--More--(xx%)' message.
|
|
||||||
|
|
||||||
In the following commands, i is a numerical argument (1 by
|
|
||||||
default).
|
|
||||||
|
|
||||||
iSPACE Display another screenful, or i more lines if i
|
|
||||||
is specified.
|
|
||||||
|
|
||||||
iRETURN Display another line, or i more lines, if speci-
|
|
||||||
fied.
|
|
||||||
|
|
||||||
i^D (CTRL-D) Display (scroll down) 11 more lines. i
|
|
||||||
is given, the scroll size is set to i.
|
|
||||||
|
|
||||||
id Same as ^D.
|
|
||||||
|
|
||||||
iz Same as SPACE, except that i, if present,
|
|
||||||
becomes the new default number of lines per
|
|
||||||
screenful.
|
|
||||||
|
|
||||||
is Skip i lines and then print a screenful.
|
|
||||||
|
|
||||||
if Skip i screenfuls and then print a screenful.
|
|
||||||
|
|
||||||
i^B (CTRL-B) Skip back i screenfuls and then print a
|
|
||||||
screenful.
|
|
||||||
|
|
||||||
b Same as ^B (CTRL-D).
|
|
||||||
|
|
||||||
q
|
|
||||||
Q Exit from more.
|
|
||||||
|
|
||||||
= Display the current line number.
|
|
||||||
|
|
||||||
v Drop into the bvi(1) editor at the current off-
|
|
||||||
set of the current file.
|
|
||||||
w Drop into the bvi(1) editor at the current off-
|
|
||||||
set of the current file. Only the portion of the
|
|
||||||
file displayed on the screen will be loaded.
|
|
||||||
|
|
||||||
h Help. Give a description of all the more com-
|
|
||||||
mands.
|
|
||||||
|
|
||||||
i/pattern Search for the ith occurrence of the regular
|
|
||||||
expression pattern. Display the screenful
|
|
||||||
starting at the file position that contains the
|
|
||||||
ith match for the regular expression ASCII-pat-
|
|
||||||
tern, or the end of a pipe, whichever comes
|
|
||||||
first. If bmore is displaying a file and there
|
|
||||||
is no such match, its position in the file
|
|
||||||
remains unchanged. Regular expressions can be
|
|
||||||
edited using erase and kill characters. Erasing
|
|
||||||
back past the first column cancels the search
|
|
||||||
command.
|
|
||||||
|
|
||||||
' Single quote. Go to the point from which the
|
|
||||||
last search started. If no search has been per-
|
|
||||||
formed in the current file, go to the beginning
|
|
||||||
of the file.
|
|
||||||
|
|
||||||
!command Invoke a shell to execute command. The charac-
|
|
||||||
ters % and !, when used within command are
|
|
||||||
replaced with the current filename and the pre-
|
|
||||||
vious shell command, respectively. If there is
|
|
||||||
no current filename, % is not expanded. Prepend
|
|
||||||
a backslash to these characters to escape expan-
|
|
||||||
sion.
|
|
||||||
|
|
||||||
i:n Skip to the ith next filename given in the com-
|
|
||||||
mand line, or to the last filename in the list
|
|
||||||
if i is out of range.
|
|
||||||
|
|
||||||
i:p Skip to the ith previous filename given in the
|
|
||||||
command line, or to the first filename if i is
|
|
||||||
out of range. If given while more is positioned
|
|
||||||
within a file, go to the beginning of the file.
|
|
||||||
If more is reading from a pipe, more simply
|
|
||||||
rings the terminal bell.
|
|
||||||
|
|
||||||
:f Display the current filename and offset number.
|
|
||||||
|
|
||||||
:q
|
|
||||||
:Q Exit from bmore (same as q or Q ).
|
|
||||||
|
|
||||||
. Dot. Repeat the previous command.
|
|
||||||
|
|
||||||
|
|
||||||
FILES
|
|
||||||
/etc/termcap terminal data base
|
|
||||||
/usr/local/share/bmore.help
|
|
||||||
help file
|
|
||||||
|
|
||||||
SEE ALSO
|
|
||||||
bvi(1), termcap(5)
|
|
||||||
|
|
||||||
3 Jan 2004
|
|
Before Width: | Height: | Size: 6.7 KiB |
26
bvi.1
|
@ -93,7 +93,7 @@
|
||||||
.nr % 0
|
.nr % 0
|
||||||
.rr F
|
.rr F
|
||||||
.\}
|
.\}
|
||||||
.TH BVI 1 "BVI Version 1.3.2" "3/Jan/2004" "User Commands"
|
.TH BVI 1 "BVI Version 1.4.0" "25/Aug/2013" "User Commands"
|
||||||
.IX Title "BVI 1"
|
.IX Title "BVI 1"
|
||||||
.UC
|
.UC
|
||||||
.IX Name "bvi, bview - visual display editor for binary files"
|
.IX Name "bvi, bview - visual display editor for binary files"
|
||||||
|
@ -194,11 +194,11 @@
|
||||||
bvi, bview \- visual editor for binary files
|
bvi, bview \- visual editor for binary files
|
||||||
.SH "VERSION"
|
.SH "VERSION"
|
||||||
.IX Header "VERSION"
|
.IX Header "VERSION"
|
||||||
bvi-1.3.2
|
bvi-1.4.0
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.IX Header "SYNOPSIS"
|
.IX Header "SYNOPSIS"
|
||||||
\fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-b\fR\ \fIbegin\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-s\fR\ \fIsize\fR]\ \fIfile\fR...
|
\fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR...
|
||||||
\fBbview\fR\ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-b\fR\ \fIbegin\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-s\fR\ \fIsize\fR]\ \fIfile\fR...
|
\fBbview\fR\ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR...
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
.IX Header "OPTIONS"
|
.IX Header "OPTIONS"
|
||||||
.Ip "\fIfile\fR..." 4
|
.Ip "\fIfile\fR..." 4
|
||||||
|
@ -212,18 +212,24 @@ the buffer. You can get to the other files with the ":next" command.
|
||||||
\*(L"Readonly": The readonly flag is set for all the files,
|
\*(L"Readonly": The readonly flag is set for all the files,
|
||||||
preventing accidental overwriting with a write command.
|
preventing accidental overwriting with a write command.
|
||||||
|
|
||||||
.Ip "\fB\-b\fR \fIbegin\fR" 4
|
.Ip "\fB\-s\fR \fIskip\fR" 4
|
||||||
.IX Item "\fB\-b\fR \fIbegin\fR"
|
.IX Item "\fB\-s\fR \fIskip\fR"
|
||||||
causes bvi to load a file not from the start but from
|
causes bvi to load a file not from the start but from
|
||||||
offset \fIbegin\fR.
|
offset \fIskip\fR.
|
||||||
|
Skip offset bytes from the beginning of the input. By default, offset
|
||||||
|
is interpreted as a decimal number. With a leading 0x or 0X, offset is
|
||||||
|
interpreted as a hexadecimal number, otherwise, with a leading 0, offset
|
||||||
|
is interpreted as an octal number. Appending the character b, k, or m
|
||||||
|
to offset causes it to be interpreted as a multiple of 512, 1024, or
|
||||||
|
1048576, respectively.
|
||||||
|
|
||||||
.Ip "\fB\-e\fR \fIend\fR" 4
|
.Ip "\fB\-e\fR \fIend\fR" 4
|
||||||
.IX Item "\fB\-e\fR \fIend\fR"
|
.IX Item "\fB\-e\fR \fIend\fR"
|
||||||
causes bvi to load a file not till end but till address \fIend\fR.
|
causes bvi to load a file not till end but till address \fIend\fR.
|
||||||
|
|
||||||
.Ip "\fB\-s\fR \fIsize\fR" 4
|
.Ip "\fB\-n\fR \fIlength\fR" 4
|
||||||
.IX Item "\fB\-s\fR \fIsize\fR"
|
.IX Item "\fB\-n\fR \fIlength\fR"
|
||||||
causes bvi not to load the complete file but only \fIsize\fR bytes.
|
causes bvi not to load the complete file but only \fIlength\fR bytes.
|
||||||
|
|
||||||
.Ip "\fB\-c\fR \fIcmd\fR" 4
|
.Ip "\fB\-c\fR \fIcmd\fR" 4
|
||||||
.IX Item "\fB\-c\fR \fIcmd\fR"
|
.IX Item "\fB\-c\fR \fIcmd\fR"
|
||||||
|
|
179
bvi.c
|
@ -9,10 +9,13 @@
|
||||||
* 2000-10-24 V 1.3.0 final
|
* 2000-10-24 V 1.3.0 final
|
||||||
* 2002-01-03 V 1.3.1
|
* 2002-01-03 V 1.3.1
|
||||||
* 2004-01-04 V 1.3.2
|
* 2004-01-04 V 1.3.2
|
||||||
|
* 2006-04-04 V 1.3.3
|
||||||
|
* 2013-08-23 V 1.4.0alpha
|
||||||
|
* 2014-10-07 V 1.4.0
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2004 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -38,13 +41,13 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char *copyright = "Copyright (C) 1996-2004 by Gerhard Buergmann";
|
char *copyright = "Copyright (C) 1996-2014 by Gerhard Buergmann";
|
||||||
|
|
||||||
jmp_buf env; /* context for `longjmp' function */
|
jmp_buf env; /* context for `longjmp' function */
|
||||||
|
|
||||||
int loc;
|
int loc;
|
||||||
int maxx, maxy, x, xx, y;
|
int maxx, maxy, x, xx, y;
|
||||||
int screen, status;
|
int screen, status, statsize;
|
||||||
off_t size;
|
off_t size;
|
||||||
PTR mem = NULL;
|
PTR mem = NULL;
|
||||||
PTR curpos;
|
PTR curpos;
|
||||||
|
@ -53,15 +56,19 @@ PTR pagepos;
|
||||||
PTR spos;
|
PTR spos;
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
char *shell;
|
char *shell;
|
||||||
char string[MAXCMD];
|
char string[MAXCMD+1];
|
||||||
char cmdstr[MAXCMD + 1] = "";
|
char cmdstr[MAXCMD+1] = "";
|
||||||
FILE *Ausgabe_Datei;
|
FILE *Ausgabe_Datei;
|
||||||
int edits = 0;
|
int edits = 0;
|
||||||
int AnzAdd, Anzahl, Anzahl3;
|
int AnzAdd, Anzahl, Anzahl3;
|
||||||
off_t filesize, memsize, undosize;
|
off_t filesize, memsize, undosize;
|
||||||
long precount = -1; /* number preceding command */
|
|
||||||
|
|
||||||
|
long precount = -1;
|
||||||
|
|
||||||
int block_flag = 0;
|
int block_flag = 0;
|
||||||
|
|
||||||
|
|
||||||
off_t block_begin, block_end, block_size;
|
off_t block_begin, block_end, block_size;
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +77,7 @@ int numfiles; /* number of input files */
|
||||||
int curfile; /* number of the current file */
|
int curfile; /* number of the current file */
|
||||||
|
|
||||||
int arrnum = 0;
|
int arrnum = 0;
|
||||||
char numarr[64]; /* string for collecting number */
|
char numarr[MAXCMD+1]; /* string for collecting number */
|
||||||
char rep_buf[BUFFER];
|
char rep_buf[BUFFER];
|
||||||
|
|
||||||
PTR current;
|
PTR current;
|
||||||
|
@ -88,17 +95,19 @@ char addr_form[15];
|
||||||
char *nobytes = "No bytes@in the buffer";
|
char *nobytes = "No bytes@in the buffer";
|
||||||
|
|
||||||
static char progname[8];
|
static char progname[8];
|
||||||
static char line[MAXCMD];
|
static char line[MAXCMD+1];
|
||||||
static int mark;
|
static int mark;
|
||||||
static int scrolly;
|
|
||||||
static int wrstat = 1;
|
static int wrstat = 1;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(stderr, "Usage: %s [-R] [-c cmd | +cmd] [-f script]\n\
|
fprintf(stderr, "Usage: %s [-R] [-c cmd | +cmd] [-f script]\n\
|
||||||
[-b begin] [-e end] [-s size] file ...\n", progname);
|
[-s skip] [-e end] [-n length] file ...\n\
|
||||||
|
file offset/size: 10k, 20m, 1g, 0x1000 hex, 0200 octal\n", progname);
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +125,8 @@ main(argc, argv)
|
||||||
off_t inaddr;
|
off_t inaddr;
|
||||||
char *poi;
|
char *poi;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
#endif
|
#endif
|
||||||
|
@ -150,26 +161,27 @@ main(argc, argv)
|
||||||
} else {
|
} else {
|
||||||
script = ++n;
|
script = ++n;
|
||||||
}
|
}
|
||||||
} else if (argv[n][1] == 'b') {
|
|
||||||
|
} else if (argv[n][1] == 's') {
|
||||||
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
||||||
usage();
|
usage();
|
||||||
} else {
|
} else {
|
||||||
block_begin = calc_size(argv[++n]);
|
block_begin = calc_size(argv[++n]);
|
||||||
block_flag |= 1;
|
block_flag |= BLOCK_BEGIN;
|
||||||
}
|
}
|
||||||
} else if (argv[n][1] == 'e') {
|
} else if (argv[n][1] == 'e') {
|
||||||
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
||||||
usage();
|
usage();
|
||||||
} else {
|
} else {
|
||||||
block_end = calc_size(argv[++n]);
|
block_end = calc_size(argv[++n]);
|
||||||
block_flag |= 2;
|
block_flag |= BLOCK_END;
|
||||||
}
|
}
|
||||||
} else if (argv[n][1] == 's') {
|
} else if (argv[n][1] == 'n') {
|
||||||
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
||||||
usage();
|
usage();
|
||||||
} else {
|
} else {
|
||||||
block_size = calc_size(argv[++n]);
|
block_size = calc_size(argv[++n]);
|
||||||
block_flag |= 4;
|
block_flag |= BLOCK_LEN;
|
||||||
}
|
}
|
||||||
} else if (argv[n][1] == 'w') {
|
} else if (argv[n][1] == 'w') {
|
||||||
if (argv[n][2] == '\0') {
|
if (argv[n][2] == '\0') {
|
||||||
|
@ -197,28 +209,39 @@ main(argc, argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* TODO default block_size - end of file up to max 64 KB with warning */
|
||||||
switch (block_flag) {
|
switch (block_flag) {
|
||||||
case 2:
|
case BLOCK_BEGIN:
|
||||||
|
/* Acc. to SF-Error 3036881 we should use the whole rest of the file */
|
||||||
|
/*
|
||||||
|
block_size = 1024;
|
||||||
|
block_end = block_begin + block_size - 1;
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
case BLOCK_END:
|
||||||
block_begin = 0;
|
block_begin = 0;
|
||||||
case 1|2:
|
|
||||||
block_size = block_end - block_begin + 1;
|
block_size = block_end - block_begin + 1;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case BLOCK_BEGIN|BLOCK_END:
|
||||||
|
block_size = block_end - block_begin + 1;
|
||||||
|
break;
|
||||||
|
case BLOCK_LEN:
|
||||||
block_begin = 0;
|
block_begin = 0;
|
||||||
case 1|4:
|
|
||||||
block_end = block_begin + block_size - 1;
|
block_end = block_begin + block_size - 1;
|
||||||
break;
|
break;
|
||||||
case 2|4:
|
case BLOCK_BEGIN|BLOCK_LEN:
|
||||||
|
block_end = block_begin + block_size - 1;
|
||||||
|
break;
|
||||||
|
case BLOCK_END|BLOCK_LEN:
|
||||||
block_begin = block_end + 1 - block_size;
|
block_begin = block_end + 1 - block_size;
|
||||||
break;
|
break;
|
||||||
case 1|2|4:
|
case BLOCK_BEGIN|BLOCK_END|BLOCK_LEN:
|
||||||
if (block_end - block_begin != block_size + 1) {
|
if (block_end - block_begin != block_size + 1) {
|
||||||
fprintf(stderr, "Ambigous block data\n");
|
fprintf(stderr, "Ambigous block data\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block_flag && !numfiles) {
|
if (block_flag && !numfiles) {
|
||||||
fprintf(stderr, "Cannot read a range of a nonexisting file\n");
|
fprintf(stderr, "Cannot read a range of a nonexisting file\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -232,8 +255,7 @@ main(argc, argv)
|
||||||
|
|
||||||
maxy = LINES;
|
maxy = LINES;
|
||||||
if (params[P_LI].flags & P_CHANGED) maxy = P(P_LI);
|
if (params[P_LI].flags & P_CHANGED) maxy = P(P_LI);
|
||||||
scrolly = maxy / 2;
|
P(P_SS) = maxy / 2;
|
||||||
P(P_SS) = scrolly;
|
|
||||||
P(P_LI) = maxy;
|
P(P_LI) = maxy;
|
||||||
maxy--;
|
maxy--;
|
||||||
keypad(stdscr, TRUE);
|
keypad(stdscr, TRUE);
|
||||||
|
@ -242,18 +264,27 @@ main(argc, argv)
|
||||||
cbreak();
|
cbreak();
|
||||||
noecho();
|
noecho();
|
||||||
|
|
||||||
/*
|
{
|
||||||
AnzAdd = 8;
|
/* address column width */
|
||||||
strcpy(addr_form, "%06lX ");
|
/* default is 8 + 2 blanks */
|
||||||
*/
|
/* if block_begin has 8 hex digits or more */
|
||||||
AnzAdd = 10;
|
/* reserve 1 hex digit more than required */
|
||||||
strcpy(addr_form, "%08lX ");
|
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;
|
Anzahl = ((COLS - AnzAdd - 1) / 16) * 4;
|
||||||
P(P_CM) = Anzahl;
|
P(P_CM) = Anzahl;
|
||||||
maxx = Anzahl * 4 + AnzAdd + 1;
|
maxx = Anzahl * 4 + AnzAdd + 1;
|
||||||
Anzahl3 = Anzahl * 3;
|
Anzahl3 = Anzahl * 3;
|
||||||
status = Anzahl3 + Anzahl - 17;
|
statsize = 35;
|
||||||
|
status = Anzahl3 + Anzahl - statsize;
|
||||||
screen = Anzahl * (maxy - 1);
|
screen = Anzahl * (maxy - 1);
|
||||||
|
|
||||||
signal(SIGINT, SIG_IGN);
|
signal(SIGINT, SIG_IGN);
|
||||||
|
@ -279,11 +310,11 @@ main(argc, argv)
|
||||||
setcur();
|
setcur();
|
||||||
ch = vgetc();
|
ch = vgetc();
|
||||||
while (ch >= '0' && ch <= '9') {
|
while (ch >= '0' && ch <= '9') {
|
||||||
numarr[arrnum++] = ch;
|
if (arrnum < MAXCMD) numarr[arrnum++] = ch;
|
||||||
ch = vgetc();
|
ch = vgetc();
|
||||||
}
|
}
|
||||||
numarr[arrnum] = '\0';
|
numarr[arrnum] = '\0';
|
||||||
if (arrnum != 0) precount = strtol(numarr, (char **)NULL, 10);
|
if (arrnum != 0) precount = strtoll(numarr, (char **)NULL, 10);
|
||||||
else precount = -1;
|
else precount = -1;
|
||||||
lflag = arrnum = 0;
|
lflag = arrnum = 0;
|
||||||
|
|
||||||
|
@ -303,7 +334,7 @@ main(argc, argv)
|
||||||
break;
|
break;
|
||||||
case '~': if (precount < 1) precount = 1;
|
case '~': if (precount < 1) precount = 1;
|
||||||
sprintf(rep_buf, "%ld~", precount);
|
sprintf(rep_buf, "%ld~", precount);
|
||||||
do_tilde(precount);
|
do_tilde((off_t)precount);
|
||||||
lflag++;
|
lflag++;
|
||||||
break;
|
break;
|
||||||
case KEY_HOME:
|
case KEY_HOME:
|
||||||
|
@ -332,6 +363,7 @@ main(argc, argv)
|
||||||
else x = AnzAdd + Anzahl3;
|
else x = AnzAdd + Anzahl3;
|
||||||
break;
|
break;
|
||||||
case BVICTRL('H'):
|
case BVICTRL('H'):
|
||||||
|
case ASCII_DEL:
|
||||||
case KEY_BACKSPACE:
|
case KEY_BACKSPACE:
|
||||||
case KEY_LEFT:
|
case KEY_LEFT:
|
||||||
case 'h': do {
|
case 'h': do {
|
||||||
|
@ -398,12 +430,12 @@ main(argc, argv)
|
||||||
repaint();
|
repaint();
|
||||||
break;
|
break;
|
||||||
case BVICTRL('D'):
|
case BVICTRL('D'):
|
||||||
if (precount > 1) scrolly = precount;
|
if (precount > 1) P(P_SS) = precount;
|
||||||
scrolldown(scrolly);
|
scrolldown(P(P_SS));
|
||||||
break;
|
break;
|
||||||
case BVICTRL('U'):
|
case BVICTRL('U'):
|
||||||
if (precount > 1) scrolly = precount;
|
if (precount > 1) P(P_SS) = precount;
|
||||||
scrollup(scrolly);
|
scrollup(P(P_SS));
|
||||||
break;
|
break;
|
||||||
case BVICTRL('E'):
|
case BVICTRL('E'):
|
||||||
if (y > 0) y--;
|
if (y > 0) y--;
|
||||||
|
@ -429,7 +461,7 @@ main(argc, argv)
|
||||||
new_screen();
|
new_screen();
|
||||||
break;
|
break;
|
||||||
case BVICTRL('Y'):
|
case BVICTRL('Y'):
|
||||||
if (y < maxy) y++;
|
if (y < maxy - 1) y++;
|
||||||
scrollup(1);
|
scrollup(1);
|
||||||
break;
|
break;
|
||||||
case 'A': smsg("APPEND MODE");
|
case 'A': smsg("APPEND MODE");
|
||||||
|
@ -467,17 +499,19 @@ main(argc, argv)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'g': last_motion = current;
|
case 'g': last_motion = current;
|
||||||
msg("Goto Hex Address: ");
|
clearstr();
|
||||||
|
outmsg("Goto Hex Address:");
|
||||||
refresh();
|
refresh();
|
||||||
getcmdstr(cmdstr, 19);
|
getcmdstr(cmdstr, 18);
|
||||||
|
clearstr();
|
||||||
if (cmdstr[0] == '^') {
|
if (cmdstr[0] == '^') {
|
||||||
inaddr = P(P_OF);
|
inaddr = P(P_OF);
|
||||||
} else if (cmdstr[0] == '$') {
|
} else if (cmdstr[0] == '$') {
|
||||||
inaddr = filesize + P(P_OF) - 1L;
|
inaddr = filesize + P(P_OF) - 1L;
|
||||||
} else {
|
} else {
|
||||||
long ltmp;
|
off_t ltmp;
|
||||||
sscanf(cmdstr, "%lx", <mp);
|
sscanf(cmdstr, "%llx", (long long unsigned *)<mp);
|
||||||
inaddr = (off_t)ltmp;
|
inaddr = ltmp;
|
||||||
}
|
}
|
||||||
if (inaddr < P(P_OF)) break;
|
if (inaddr < P(P_OF)) break;
|
||||||
inaddr -= P(P_OF);
|
inaddr -= P(P_OF);
|
||||||
|
@ -485,8 +519,7 @@ main(argc, argv)
|
||||||
setpage(mem + inaddr);
|
setpage(mem + inaddr);
|
||||||
} else {
|
} else {
|
||||||
if (filesize == 0L) break;
|
if (filesize == 0L) break;
|
||||||
sprintf(string, "Max. address of current file : %06lX",
|
sprintf(string, "Max. address of current file : %06llX", (long long unsigned)(filesize - 1L + P(P_OF)));
|
||||||
(long)(filesize - 1L + P(P_OF)));
|
|
||||||
emsg(string);
|
emsg(string);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -498,11 +531,23 @@ main(argc, argv)
|
||||||
refresh();
|
refresh();
|
||||||
if (getcmdstr(line, 1)) break;
|
if (getcmdstr(line, 1)) break;
|
||||||
last_motion = current;
|
last_motion = current;
|
||||||
|
hl_spat = P(P_HL);
|
||||||
searching(ch, line, current, maxpos - 1, P(P_WS));
|
searching(ch, line, current, maxpos - 1, P(P_WS));
|
||||||
|
if (hl_spat) {
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ESC: /* un-highlight */
|
||||||
|
hl_spat = FALSE;
|
||||||
|
repaint();
|
||||||
break;
|
break;
|
||||||
case 'n': /**** Search Next ****/
|
case 'n': /**** Search Next ****/
|
||||||
case 'N': last_motion = current;
|
case 'N': last_motion = current;
|
||||||
|
hl_spat = P(P_HL);
|
||||||
searching(ch, "", current, maxpos - 1, P(P_WS));
|
searching(ch, "", current, maxpos - 1, P(P_WS));
|
||||||
|
if (hl_spat) {
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'm': do_mark(vgetc(), current);
|
case 'm': do_mark(vgetc(), current);
|
||||||
break;
|
break;
|
||||||
|
@ -537,7 +582,7 @@ main(argc, argv)
|
||||||
if ((undo_count = alloc_buf(yanked, &undo_buf)) == 0L)
|
if ((undo_count = alloc_buf(yanked, &undo_buf)) == 0L)
|
||||||
break;
|
break;
|
||||||
sprintf(rep_buf, "%ldP", precount);
|
sprintf(rep_buf, "%ldP", precount);
|
||||||
if (do_append(yanked, yank_buf)) break;
|
if (do_append((off_t)yanked, yank_buf)) break;
|
||||||
/* we save it not for undo but for the dot command
|
/* we save it not for undo but for the dot command
|
||||||
memcpy(undo_buf, yank_buf, yanked);
|
memcpy(undo_buf, yank_buf, yanked);
|
||||||
*/
|
*/
|
||||||
|
@ -553,20 +598,25 @@ main(argc, argv)
|
||||||
case 'u': do_undo();
|
case 'u': do_undo();
|
||||||
break;
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
case 'w': loc = ASCII;
|
case 'w': // loc = ASCII;
|
||||||
setpage(wordsearch(current, ch));
|
setpage(wordsearch(current, ch));
|
||||||
break;
|
break;
|
||||||
case 'y': count = range(ch);
|
case 'y': count = range(ch);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
if ((yanked = alloc_buf(count, &yank_buf)) == 0L) {
|
/*
|
||||||
|
sprintf(string, "$%ld$", (long)yanked);
|
||||||
|
msg(string);
|
||||||
|
vgetc();
|
||||||
|
*/
|
||||||
|
if ((yanked = alloc_buf((off_t)count, &yank_buf)) == 0L) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memcpy(yank_buf, current, yanked);
|
memcpy(yank_buf, current, yanked);
|
||||||
} else if (count < 0) {
|
} else if (count < 0) {
|
||||||
if ((yanked = alloc_buf(-count, &yank_buf)) == 0L) {
|
if ((yanked = alloc_buf(-(off_t)count, &yank_buf)) == 0L) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memcpy(yank_buf, current + count, yanked);
|
memcpy(yank_buf, current, yanked);
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -630,11 +680,6 @@ main(argc, argv)
|
||||||
precount = 1;
|
precount = 1;
|
||||||
undo_count = edit('i');
|
undo_count = edit('i');
|
||||||
lflag++;
|
lflag++;
|
||||||
/*
|
|
||||||
} else if (count) {
|
|
||||||
sprintf(string, "%ld bytes deleted", labs(count));
|
|
||||||
msg(string);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
|
@ -683,13 +728,20 @@ off_t
|
||||||
calc_size(arg)
|
calc_size(arg)
|
||||||
char *arg;
|
char *arg;
|
||||||
{
|
{
|
||||||
long val;
|
off_t val;
|
||||||
|
extern int errno;
|
||||||
char *poi;
|
char *poi;
|
||||||
|
|
||||||
if (*arg == '0') {
|
errno = 0;
|
||||||
val = strtol(arg, &poi, 16);
|
val = strtoll(arg, &poi, 0);
|
||||||
} else {
|
if (val < 0) {
|
||||||
val = strtol(arg, &poi, 10);
|
fprintf(stderr, "negative begin/size/end not allowed\n");
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
if (poi == arg || errno != 0) {
|
||||||
|
/* cygwin gdb displays errno incorrectly as 0 */
|
||||||
|
fprintf(stderr, "invalid begin/size/end (hex nr 0x#, octal 0#)\n");
|
||||||
|
usage();
|
||||||
}
|
}
|
||||||
switch (*poi) {
|
switch (*poi) {
|
||||||
case 'k':
|
case 'k':
|
||||||
|
@ -698,6 +750,9 @@ calc_size(arg)
|
||||||
case 'm':
|
case 'm':
|
||||||
case 'M': val *= 1048576;
|
case 'M': val *= 1048576;
|
||||||
break;
|
break;
|
||||||
|
case 'g':
|
||||||
|
case 'G': val *= 1024*1024*1024LL;
|
||||||
|
break;
|
||||||
case '\0': break;
|
case '\0': break;
|
||||||
default: usage();
|
default: usage();
|
||||||
}
|
}
|
||||||
|
@ -723,7 +778,7 @@ trunc_cur()
|
||||||
|
|
||||||
int
|
int
|
||||||
do_append(count, buf)
|
do_append(count, buf)
|
||||||
int count;
|
off_t count;
|
||||||
char *buf;
|
char *buf;
|
||||||
{
|
{
|
||||||
if (filesize + count > memsize) {
|
if (filesize + count > memsize) {
|
||||||
|
|
28
bvi.h
|
@ -9,10 +9,12 @@
|
||||||
* 2000-10-24 V 1.3.0 final
|
* 2000-10-24 V 1.3.0 final
|
||||||
* 2001-10-29 V 1.3.1
|
* 2001-10-29 V 1.3.1
|
||||||
* 2003-07-04 V 1.3.2
|
* 2003-07-04 V 1.3.2
|
||||||
|
* 2010-08-04 V 1.3.4
|
||||||
|
* 2014-10-01 V 1.4.0
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -37,6 +39,8 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
|
#define JOEHTG
|
||||||
|
|
||||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||||
# include "patchlev.h"
|
# include "patchlev.h"
|
||||||
# include "dosconf.h"
|
# include "dosconf.h"
|
||||||
|
@ -97,7 +101,8 @@
|
||||||
#define BS 8
|
#define BS 8
|
||||||
#define ESC 27
|
#define ESC 27
|
||||||
#define SEARCH 0
|
#define SEARCH 0
|
||||||
#define BVICTRL(n) (n&0x1f)
|
#define BVICTRL(n) (n&0x1f)
|
||||||
|
#define ASCII_DEL 0x7f
|
||||||
|
|
||||||
#define CMDLNG(a,b) (len <= a && len >= b)
|
#define CMDLNG(a,b) (len <= a && len >= b)
|
||||||
|
|
||||||
|
@ -129,6 +134,12 @@
|
||||||
|
|
||||||
#define SKIP_WHITE while(*cmd!='\0'&&isspace(*cmd))cmd++;
|
#define SKIP_WHITE while(*cmd!='\0'&&isspace(*cmd))cmd++;
|
||||||
|
|
||||||
|
typedef enum _block_datum {
|
||||||
|
BLOCK_BEGIN = 1,
|
||||||
|
BLOCK_END = 2,
|
||||||
|
BLOCK_LEN = 4
|
||||||
|
} block_datum;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
extern FILE *debug_fp;
|
extern FILE *debug_fp;
|
||||||
#endif
|
#endif
|
||||||
|
@ -139,6 +150,8 @@
|
||||||
|
|
||||||
extern char *version;
|
extern char *version;
|
||||||
extern char addr_form[];
|
extern char addr_form[];
|
||||||
|
extern char search_pat[];
|
||||||
|
extern long hl_spat;
|
||||||
extern char pattern[];
|
extern char pattern[];
|
||||||
extern char rep_buf[];
|
extern char rep_buf[];
|
||||||
extern int maxx, maxy, x, y;
|
extern int maxx, maxy, x, y;
|
||||||
|
@ -148,7 +161,7 @@ extern int AnzAdd;
|
||||||
extern int Anzahl, Anzahl3;
|
extern int Anzahl, Anzahl3;
|
||||||
extern int addr_flag;
|
extern int addr_flag;
|
||||||
extern int ignore_case, magic;
|
extern int ignore_case, magic;
|
||||||
extern int screen, status;
|
extern int screen, status, statsize;
|
||||||
extern PTR mem;
|
extern PTR mem;
|
||||||
extern PTR maxpos;
|
extern PTR maxpos;
|
||||||
extern PTR pagepos;
|
extern PTR pagepos;
|
||||||
|
@ -204,7 +217,7 @@ extern off_t block_begin, block_end, block_size;
|
||||||
int bregexec(PTR, char *);
|
int bregexec(PTR, char *);
|
||||||
int chk_comm(int);
|
int chk_comm(int);
|
||||||
int doecmd(char *, int);
|
int doecmd(char *, int);
|
||||||
int do_append(int, char *), do_logic(int, char *);
|
int do_append(off_t, char *), do_logic(int, char *);
|
||||||
int do_delete(off_t, PTR);
|
int do_delete(off_t, PTR);
|
||||||
int doset(char *);
|
int doset(char *);
|
||||||
int do_substitution(int, char *, PTR, PTR);
|
int do_substitution(int, char *, PTR, PTR);
|
||||||
|
@ -214,6 +227,7 @@ extern off_t block_begin, block_end, block_size;
|
||||||
PTR wordsearch(PTR, char);
|
PTR wordsearch(PTR, char);
|
||||||
PTR backsearch(PTR, char);
|
PTR backsearch(PTR, char);
|
||||||
PTR fsearch(PTR, PTR, char *);
|
PTR fsearch(PTR, PTR, char *);
|
||||||
|
PTR fsearch_end(PTR, PTR, char *, PTR *);
|
||||||
PTR rsearch(PTR, PTR, char *);
|
PTR rsearch(PTR, PTR, char *);
|
||||||
PTR end_word(PTR);
|
PTR end_word(PTR);
|
||||||
PTR calc_addr(char **, PTR);
|
PTR calc_addr(char **, PTR);
|
||||||
|
@ -256,8 +270,10 @@ extern off_t block_begin, block_end, block_size;
|
||||||
PTR searching();
|
PTR searching();
|
||||||
PTR wordsearch();
|
PTR wordsearch();
|
||||||
PTR backsearch();
|
PTR backsearch();
|
||||||
int bregexec();
|
/* int bregexec(); */
|
||||||
|
PTR bregexec();
|
||||||
PTR fsearch();
|
PTR fsearch();
|
||||||
|
PTR fsearch_end();
|
||||||
PTR rsearch();
|
PTR rsearch();
|
||||||
PTR end_word();
|
PTR end_word();
|
||||||
PTR calc_addr();
|
PTR calc_addr();
|
||||||
|
|
424
bvi.man
|
@ -1,424 +0,0 @@
|
||||||
BVI(1) User Commands BVI(1)
|
|
||||||
|
|
||||||
|
|
||||||
NAME
|
|
||||||
bvi, bview - visual editor for binary files
|
|
||||||
|
|
||||||
VERSION
|
|
||||||
bvi-1.3.2
|
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
bvi [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file...
|
|
||||||
bview [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file...
|
|
||||||
|
|
||||||
OPTIONS
|
|
||||||
file...
|
|
||||||
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.
|
|
||||||
|
|
||||||
-R "Readonly": The readonly flag is set for all the
|
|
||||||
files, preventing accidental overwriting with a write
|
|
||||||
command.
|
|
||||||
|
|
||||||
|
|
||||||
-b begin
|
|
||||||
causes bvi to load a file not from the start but from
|
|
||||||
offset begin.
|
|
||||||
|
|
||||||
|
|
||||||
-e end
|
|
||||||
causes bvi to load a file not till end but till
|
|
||||||
address end.
|
|
||||||
|
|
||||||
|
|
||||||
-s size
|
|
||||||
causes bvi not to load the complete file but only size
|
|
||||||
bytes.
|
|
||||||
|
|
||||||
|
|
||||||
-c cmd
|
|
||||||
cmd will be executed after the first file has
|
|
||||||
been read. If the cmd contains spaces it must be
|
|
||||||
enclosed in double quotes (this depends on the shell
|
|
||||||
that is used).
|
|
||||||
|
|
||||||
-f script
|
|
||||||
This command provides a means for collecting a series
|
|
||||||
of "ex" (colon) commands into a script file, then
|
|
||||||
using this file to edit other files. Since there is no
|
|
||||||
binary stream editor "bsed", you can use this option
|
|
||||||
to make several global changes in a binary file.
|
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
Bvi stands for "Binary VIsual editor". Bvi is a screen
|
|
||||||
oriented editor for binary files; its command set is based
|
|
||||||
on that of the vi(1) text editor. As a binary editor does
|
|
||||||
not have the concept of "lines" there are differences from
|
|
||||||
Vi commands wherever the latter are line orientate.
|
|
||||||
|
|
||||||
COMPARISON
|
|
||||||
The main differences between Vi and Bvi are:
|
|
||||||
|
|
||||||
The screen is divided in three sections or panes: 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. Note that (as one would expect) the first
|
|
||||||
byte has the offset '0' (zero).
|
|
||||||
|
|
||||||
You can toggle between the hex and ascii windows with the
|
|
||||||
tab key (TAB). Toggling between these two windows does
|
|
||||||
not change the current position (offset) within the file.
|
|
||||||
|
|
||||||
No "lines" concept: Files are treated as one long stream
|
|
||||||
of bytes. The characters "newline" and "carriage return"
|
|
||||||
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. As a consequence there are no commands in bvi
|
|
||||||
from ex or vi that are based on line numbers, eg "dd",
|
|
||||||
"yy", 'C', 'S', 'o', 'O'. This also changes the meaning
|
|
||||||
of "range" before the ":write" command to a byte offset,
|
|
||||||
ie the command ":100,200w foo" writes all *bytes* (not
|
|
||||||
lines) from offset 100 to offset 200 to the file "foo".
|
|
||||||
|
|
||||||
No "text objects": There are also no text-specific
|
|
||||||
arrangements like words, paragraphs, sentences, sections
|
|
||||||
and so on.
|
|
||||||
|
|
||||||
Extended "ruler": The bottom line of the screen shows the
|
|
||||||
current address (byte offset) and the current character in
|
|
||||||
these notations:
|
|
||||||
|
|
||||||
octal, hexadecimal, decimal and ascii.
|
|
||||||
|
|
||||||
Search patterns: All search commands understand these
|
|
||||||
special characters:
|
|
||||||
|
|
||||||
. any character
|
|
||||||
[] set of characters
|
|
||||||
* zero or more occurrences of previous char or set
|
|
||||||
|
|
||||||
But as there is no concept of lines you cannot use the
|
|
||||||
standard symbols ("anchors") for "begin-of-line" ('^') and
|
|
||||||
"end-of-line" ('$'). Searching for the start/end of lines
|
|
||||||
must be done explicitly by adding these special characters
|
|
||||||
to your search pattern using these meta sequences:
|
|
||||||
|
|
||||||
\n newline
|
|
||||||
\r return
|
|
||||||
\t tab
|
|
||||||
\0 binary zero
|
|
||||||
|
|
||||||
Additional search commands: Similar to the text search
|
|
||||||
commands there are additional hex-search functions '\' and
|
|
||||||
'#' which allow to search for any byte value. Example:
|
|
||||||
"\62 76 69" will search for the string "bvi". Spaces
|
|
||||||
between hex value are optional, so searching for
|
|
||||||
"6775636B6573" will find "guckes".
|
|
||||||
|
|
||||||
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 thus disabled by
|
|
||||||
default. You can enable this commands by typing
|
|
||||||
|
|
||||||
:set memmove
|
|
||||||
|
|
||||||
BVI Modes:
|
|
||||||
|
|
||||||
Command Mode (Normal Mode):
|
|
||||||
|
|
||||||
Input is treated as command. Note that command mode is
|
|
||||||
the default mode after startup and after escaping from
|
|
||||||
input mode. Use ESC (escape) to cancel a partial
|
|
||||||
(uncompleted) command.
|
|
||||||
|
|
||||||
Input Mode:
|
|
||||||
|
|
||||||
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 'i', 'I', 'A', 'r', or 'R'. 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. Type CTRL-C to
|
|
||||||
cancel current command abnormally.
|
|
||||||
|
|
||||||
Command line mode (Last Line Mode or : mode):
|
|
||||||
|
|
||||||
Similar to vi, this mode is entered by typing one of the
|
|
||||||
characters : / ? \ # ! The command is terminated and
|
|
||||||
executed by typing a carriage return; to cancel a
|
|
||||||
partially typed command, type ESC to cancel the current
|
|
||||||
command and return to command mode.
|
|
||||||
|
|
||||||
ENVIRONMENT
|
|
||||||
The editor recognizes the environment variable BVIINIT as
|
|
||||||
a command (or list of commands) to run when it starts
|
|
||||||
up. If this variable is undefined, the editor checks for
|
|
||||||
startup commands in the file ~/.bvirc file, which you
|
|
||||||
must own. However, if there is a .bvirc owned by you in
|
|
||||||
the current directory, the editor takes its startup
|
|
||||||
commands from this file - overriding both the file in your
|
|
||||||
home directory and the environment variable.
|
|
||||||
|
|
||||||
TERMINOLOGY
|
|
||||||
Characters names are abbreviated as follows:
|
|
||||||
Abbr. ASCII name aka
|
|
||||||
CR 010 carriage return
|
|
||||||
^A 001 control-a
|
|
||||||
^H 008 control-h
|
|
||||||
^I 009 control-i aka TAB
|
|
||||||
^U 021 control-u
|
|
||||||
^Z 026 control-z
|
|
||||||
ESC 027 escape aka ESC
|
|
||||||
DEL 127 delete
|
|
||||||
LEFT --- left arrow
|
|
||||||
RIGHT --- right arrow
|
|
||||||
DOWN --- down arrow
|
|
||||||
UP --- up arrow
|
|
||||||
|
|
||||||
COMMAND SUMMARY
|
|
||||||
See the TERMINOLOGY for a summary on key name
|
|
||||||
abbreviations used within the following description of
|
|
||||||
commands.
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
Arrow keys move the cursor on the screen within the
|
|
||||||
current window.
|
|
||||||
|
|
||||||
Sample commands:
|
|
||||||
:version show version info
|
|
||||||
<- v ^ -> arrow keys move the cursor
|
|
||||||
h j k l same as arrow keys
|
|
||||||
u undo previous change
|
|
||||||
ZZ exit bvi, saving changes
|
|
||||||
:q! quit, discarding changes
|
|
||||||
/text search for text
|
|
||||||
^U ^D scroll up or down
|
|
||||||
|
|
||||||
Counts before bvi commands:
|
|
||||||
Numbers may be typed as a prefix to some commands.
|
|
||||||
They are interpreted in one of these ways.
|
|
||||||
|
|
||||||
screen column |
|
|
||||||
byte of file G
|
|
||||||
scroll amount ^D ^U
|
|
||||||
repeat effect most of the rest
|
|
||||||
|
|
||||||
Interrupting, canceling
|
|
||||||
ESC end insert or incomplete command
|
|
||||||
DEL (delete or rubout) interrupts
|
|
||||||
|
|
||||||
File manipulation:
|
|
||||||
ZZ if file modified, write and exit;
|
|
||||||
otherwise, exit
|
|
||||||
:w write changed buffer to file
|
|
||||||
:w! write changed buffer to file, overriding
|
|
||||||
read-only ("forced" write)
|
|
||||||
:q quit when no changes have been made
|
|
||||||
:q! quit and discard all changes
|
|
||||||
:e file edit file
|
|
||||||
:e! re-read current file, discard all changes
|
|
||||||
:e # edit the alternate file
|
|
||||||
:e! # edit the alternate file, discard changes
|
|
||||||
:w file write current buffer to file
|
|
||||||
:w! file write current buffer to file overriding
|
|
||||||
read-only (this "overwrites" the file)
|
|
||||||
:sh run the command as set with option "shell",
|
|
||||||
then return
|
|
||||||
:!cmd run the command cmd from "shell", then
|
|
||||||
return
|
|
||||||
:n edit next file in the argument list
|
|
||||||
:f show current filename, modified flag,
|
|
||||||
current byte offset, and percentage of
|
|
||||||
current position within buffer
|
|
||||||
^G same as :f
|
|
||||||
|
|
||||||
Additional edit 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 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 \n,
|
|
||||||
\r, \t and \0.
|
|
||||||
|
|
||||||
:i aCR insert bytes (ASCII) at cursor position
|
|
||||||
:a bCR append bytes (Binary) at end of file
|
|
||||||
:c hCR change bytes (hexadecimal) at cursor position
|
|
||||||
|
|
||||||
Bit-level operations
|
|
||||||
:and n bitwise 'and' operation with value n
|
|
||||||
:or n bitwise 'or' operation with value n
|
|
||||||
:xor n bitwise 'xor' operation with value n
|
|
||||||
:neg two's complement
|
|
||||||
:not logical negation
|
|
||||||
:sl i shift each byte i bits to the left
|
|
||||||
:sr i shift each byte i bits to the right
|
|
||||||
:rl i rotate each byte i bits to the left
|
|
||||||
:rr i rotate each byte i bits to the right
|
|
||||||
|
|
||||||
Command mode addresses
|
|
||||||
:w foo write current buffer to a file
|
|
||||||
named "foo"
|
|
||||||
:5,10w foo copy byte 5 through 100 into as
|
|
||||||
file named foo
|
|
||||||
:.,.+20w foo copy the current byte and the next
|
|
||||||
20 bytes to foo
|
|
||||||
:^,'aw foo write all bytes from the beginning
|
|
||||||
through marker 'a'
|
|
||||||
:/pat/,$ foo search pattern pat and and copy
|
|
||||||
through end of file
|
|
||||||
|
|
||||||
Positioning within file:
|
|
||||||
^B backward screen
|
|
||||||
^F forward screen
|
|
||||||
^D scroll down half screen
|
|
||||||
^U scroll up half screen
|
|
||||||
nG go to the specified character
|
|
||||||
(end default), where n is a decimal address
|
|
||||||
/pat next line matching pat
|
|
||||||
?pat previous line matching pat
|
|
||||||
\hex jump to next occurrence of hex string hex
|
|
||||||
#hex jump to previous occurrence of hex string hex
|
|
||||||
n repeat last search command
|
|
||||||
N repeat last search command, but in opposite
|
|
||||||
direction
|
|
||||||
|
|
||||||
Adjusting the screen:
|
|
||||||
^L clear and redraw screen
|
|
||||||
zCR redraw screen with current line at top of screen
|
|
||||||
z- redraw screen with current line at bottom of
|
|
||||||
screen
|
|
||||||
z. redraw screen with current line at center of
|
|
||||||
screen
|
|
||||||
/pat/z- search for pattern pat and then move currents
|
|
||||||
line to bottom
|
|
||||||
^E scroll screen down 1 line
|
|
||||||
^Y scroll screen up 1 line
|
|
||||||
|
|
||||||
Marking and returning:
|
|
||||||
mx mark current position with lower-case letter x
|
|
||||||
Note: this command works for all lower-case
|
|
||||||
letters
|
|
||||||
'x move cursor to mark x in ASCII section
|
|
||||||
`x move cursor to mark x in HEX section
|
|
||||||
'' move cursor to previous context in ASCII section
|
|
||||||
`` move cursor to previous context in HEX section
|
|
||||||
Line positioning:
|
|
||||||
H jump to first line on screen ("top")
|
|
||||||
L jump to last line on screen ("low")
|
|
||||||
M jump to middle line on screen ("middle")
|
|
||||||
- jump onto previous line on screen
|
|
||||||
+ jump onto next line on screen
|
|
||||||
CR same as +
|
|
||||||
DOWN or j next line, same column
|
|
||||||
UP or k previous line, same column
|
|
||||||
|
|
||||||
Character positioning:
|
|
||||||
^ first byte in HEX window
|
|
||||||
$ end of screen line
|
|
||||||
l or RIGHT jump onto next byte (within current
|
|
||||||
screen line)
|
|
||||||
h or LEFT jump onto previous byte (within current
|
|
||||||
screen line)
|
|
||||||
^H same as LEFT
|
|
||||||
space same as RIGHT
|
|
||||||
fx find next occurrence of character x
|
|
||||||
Fx find previous occurrence of character x
|
|
||||||
n| jump onto nth byte/character within current
|
|
||||||
line
|
|
||||||
|
|
||||||
Strings:
|
|
||||||
(works similar to the strings(1) command)
|
|
||||||
Note: "Words" are defined as strings of "nonprinting
|
|
||||||
characters".
|
|
||||||
e jump to next end of word
|
|
||||||
w jump to next begin of word
|
|
||||||
b jump to previous begin of word
|
|
||||||
W forward to next string delimited with a
|
|
||||||
\0 or \n
|
|
||||||
B back to previous string delimited with a
|
|
||||||
nonprinting char
|
|
||||||
Corrections during insert:
|
|
||||||
^H erase last character (backspace)
|
|
||||||
erase your erase character, same as ^H (backspace)
|
|
||||||
ESC ends insertion, back to command mode
|
|
||||||
|
|
||||||
Append and replace:
|
|
||||||
A append at end of file
|
|
||||||
rx replace current bte with char 'x'
|
|
||||||
R enter replace mode; for all subsequent input,
|
|
||||||
the current byte is overwritten with the next
|
|
||||||
input character; leave replace mode with ESC.
|
|
||||||
|
|
||||||
Miscellaneous Operations:
|
|
||||||
TAB toggle between ASCII and HEX section
|
|
||||||
|
|
||||||
Yank and Put:
|
|
||||||
3ySPACE yank 3 characters
|
|
||||||
p insert contents of yank buffer
|
|
||||||
o replace text with content of yank buffer
|
|
||||||
P put back at end of file
|
|
||||||
|
|
||||||
Undo, Redo:
|
|
||||||
u undo last change
|
|
||||||
Note: Only the last change can be undone.
|
|
||||||
Therefore this commands toggles between the
|
|
||||||
last and second-t-last state of the buffer.
|
|
||||||
|
|
||||||
Setting Options:
|
|
||||||
With the :set command you can set options in bvi
|
|
||||||
|
|
||||||
Option Default Description
|
|
||||||
|
|
||||||
autowrite noaw Save current file, if modified, if you
|
|
||||||
give a :n, :r or ! command
|
|
||||||
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
|
|
||||||
offset of=0 adds an offset to the diplayed addresses
|
|
||||||
readonly noro If set, write fails unless you use ! after command
|
|
||||||
scroll sc=1/2 window
|
|
||||||
Number of lines scrolled by ^U and ^D
|
|
||||||
showmode mo Displays statusline on bottom of the screen
|
|
||||||
terse noterse Let you obtain shorter error messages
|
|
||||||
window window=screensize
|
|
||||||
Lines in window, can be reduced at slow terminals
|
|
||||||
wordlength wl=4 Length of an ASCII-string found by w, W, b or B
|
|
||||||
wrapscan ws Searches wrap around past the end of the file
|
|
||||||
unixstyle nous The representation of ascii characters below
|
|
||||||
32 is displayed in the statusline as shown
|
|
||||||
in ascii(7) if unset rather in DOS-style (^A)
|
|
||||||
|
|
||||||
|
|
||||||
AUTHOR
|
|
||||||
bvi was developed by Gerhard Buergmann, Vienna, Austria
|
|
||||||
Gerhard.Buergmann@puon.at
|
|
||||||
|
|
||||||
WWW
|
|
||||||
Bvi Homepage: http://bvi.sourceforge.net/
|
|
||||||
Vi Pages: http://www.guckes.net/vi/clones.php3
|
|
||||||
(all about Vi and its clones)
|
|
||||||
|
|
||||||
FILES
|
|
||||||
$HOME/.bvirc editor startup file
|
|
||||||
./.bvirc editor startup file
|
|
||||||
|
|
||||||
BUGS
|
|
||||||
Bvi does not update the screen when the terminal changes
|
|
||||||
its size.
|
|
||||||
|
|
||||||
SEE ALSO
|
|
||||||
vi(1), strings(1), ascii(5)
|
|
||||||
|
|
||||||
3/Jan/2004 BVI Version 1.3.2
|
|
72
comm.c
|
@ -10,10 +10,13 @@
|
||||||
* 2000-07-15 V 1.3.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-04 V 1.3.2
|
* 2003-07-04 V 1.3.2
|
||||||
|
* 2005-08-17 V 1.3.3
|
||||||
|
* 2010-06-02 V 1.3.4
|
||||||
|
* 2014-01-28 V 1.4.0
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -102,11 +105,11 @@ docmdline(cmdline)
|
||||||
char *cmd;
|
char *cmd;
|
||||||
char *p;
|
char *p;
|
||||||
size_t len;
|
size_t len;
|
||||||
int n, ok;
|
int n, ok, ret;
|
||||||
int force = 0;
|
int force = 0;
|
||||||
int saveflag;
|
int saveflag;
|
||||||
|
|
||||||
if (cmdline == NULL) return;
|
if (*cmdline == '\0') return;
|
||||||
if (*cmdline == '"') return; /** comment **/
|
if (*cmdline == '"') return; /** comment **/
|
||||||
if (strlen(cmdline) > CMDSZ - 2) {
|
if (strlen(cmdline) > CMDSZ - 2) {
|
||||||
emsg("Command too long");
|
emsg("Command too long");
|
||||||
|
@ -115,9 +118,9 @@ docmdline(cmdline)
|
||||||
strcpy(buff, cmdline);
|
strcpy(buff, cmdline);
|
||||||
cmd = buff;
|
cmd = buff;
|
||||||
|
|
||||||
/* With no address given, we start at the beginning of the file and
|
/* With no address given, we start at the beginning of the file and
|
||||||
* go to the end of the file (not line like in vi).
|
* go to the end of the file (not line like in vi).
|
||||||
*/
|
*/
|
||||||
addr_flag = 0;
|
addr_flag = 0;
|
||||||
start_addr = mem;
|
start_addr = mem;
|
||||||
end_addr = maxpos - 1;
|
end_addr = maxpos - 1;
|
||||||
|
@ -154,7 +157,7 @@ docmdline(cmdline)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (start_addr < mem) {
|
if (start_addr < mem) {
|
||||||
sprintf(string, "Negative address@- first byte is %ld", P(P_OF));
|
sprintf(string, "Negative address@- first byte is %lld", (long long)P(P_OF));
|
||||||
emsg(string);
|
emsg(string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -191,7 +194,7 @@ docmdline(cmdline)
|
||||||
if (edits) msg("[No write]|[No write since last change]");
|
if (edits) msg("[No write]|[No write since last change]");
|
||||||
savetty();
|
savetty();
|
||||||
endwin();
|
endwin();
|
||||||
system(cmdbuf + 1);
|
ret = system(cmdbuf + 1);
|
||||||
fprintf(stderr, "[Hit return to continue]");
|
fprintf(stderr, "[Hit return to continue]");
|
||||||
getchar();
|
getchar();
|
||||||
doupdate();
|
doupdate();
|
||||||
|
@ -304,11 +307,7 @@ docmdline(cmdline)
|
||||||
else ok = save(c_argv[0], start_addr, end_addr, saveflag);
|
else ok = save(c_argv[0], start_addr, end_addr, saveflag);
|
||||||
} else {
|
} else {
|
||||||
if (c_argc == 0) {
|
if (c_argc == 0) {
|
||||||
if (P(P_RO)) {
|
save_chk(name, start_addr, end_addr, saveflag);
|
||||||
sprintf(string, "\"%s\" File is read only", name);
|
|
||||||
emsg(string);
|
|
||||||
return;
|
|
||||||
} else ok = save(name, start_addr, end_addr, saveflag);
|
|
||||||
} else {
|
} else {
|
||||||
if (!stat(c_argv[0], &buf)) {
|
if (!stat(c_argv[0], &buf)) {
|
||||||
if (saveflag == WRITE) {
|
if (saveflag == WRITE) {
|
||||||
|
@ -392,10 +391,10 @@ docmdline(cmdline)
|
||||||
}
|
}
|
||||||
if (chdir(c_argv[0])) sysemsg(c_argv[0]);
|
if (chdir(c_argv[0])) sysemsg(c_argv[0]);
|
||||||
} else if (!strncmp("edit", cmdname, len) && CMDLNG(4, 1)) {
|
} else if (!strncmp("edit", cmdname, len) && CMDLNG(4, 1)) {
|
||||||
/*
|
/*
|
||||||
* The command ":e#" gets expanded to something like ":efile", so
|
* The command ":e#" gets expanded to something like ":efile", so
|
||||||
* detect that case here.
|
* detect that case here.
|
||||||
*/
|
*/
|
||||||
if (*cmd == 'e' && c_argc == 0) {
|
if (*cmd == 'e' && c_argc == 0) {
|
||||||
if (cmd[1] == '!')
|
if (cmd[1] == '!')
|
||||||
(void) doecmd(&cmd[2], TRUE);
|
(void) doecmd(&cmd[2], TRUE);
|
||||||
|
@ -626,11 +625,27 @@ yd_addr()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********** Save file if not read only ********************/
|
||||||
|
int
|
||||||
|
save_chk(fname, start, end, flags)
|
||||||
|
char *fname;
|
||||||
|
char *start;
|
||||||
|
char *end;
|
||||||
|
int flags;
|
||||||
|
{
|
||||||
|
if (P(P_RO)) {
|
||||||
|
sprintf(string, "\"%s\" File is read only", name);
|
||||||
|
emsg(string);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return save(fname, start, end, flags);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
do_exit()
|
do_exit()
|
||||||
{
|
{
|
||||||
if (edits) {
|
if (edits) {
|
||||||
if (!save(name, mem, maxpos - 1L, WRITE)) return;
|
if (!save_chk(name, mem, maxpos - 1L, WRITE)) return;
|
||||||
}
|
}
|
||||||
if ((curfile + 1) < numfiles) {
|
if ((curfile + 1) < numfiles) {
|
||||||
sprintf(string, "%d %s", numfiles - curfile - 1, morefiles);
|
sprintf(string, "%d %s", numfiles - curfile - 1, morefiles);
|
||||||
|
@ -709,13 +724,20 @@ emsg(s)
|
||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
|
int stchar;
|
||||||
|
|
||||||
if (P(P_EB)) beep();
|
if (P(P_EB)) beep();
|
||||||
|
if (P(P_MO)) {
|
||||||
|
stchar = statsize;
|
||||||
|
} else {
|
||||||
|
stchar = 0;
|
||||||
|
}
|
||||||
|
|
||||||
clearstr();
|
clearstr();
|
||||||
attrset(A_REVERSE);
|
attrset(A_REVERSE);
|
||||||
cnt = outmsg(s);
|
cnt = outmsg(s);
|
||||||
attrset(A_NORMAL);
|
attrset(A_NORMAL);
|
||||||
if (cnt >= (maxx - 25)) { /* 25 = status */
|
if (cnt >= (maxx - stchar)) {
|
||||||
addch('\n');
|
addch('\n');
|
||||||
wait_return(TRUE); }
|
wait_return(TRUE); }
|
||||||
}
|
}
|
||||||
|
@ -755,10 +777,18 @@ void
|
||||||
msg(s)
|
msg(s)
|
||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
|
int stchar;
|
||||||
|
|
||||||
|
if (P(P_MO)) {
|
||||||
|
stchar = statsize;
|
||||||
|
} else {
|
||||||
|
stchar = 0;
|
||||||
|
}
|
||||||
clearstr();
|
clearstr();
|
||||||
if (outmsg(s) >= (maxx - 25)) { /* 25 = status */
|
if (outmsg(s) >= (maxx - stchar)) {
|
||||||
addch('\n');
|
addch('\n');
|
||||||
wait_return(TRUE); }
|
wait_return(TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
1358
config.guess
vendored
Executable file → Normal file
566
config.sub
vendored
Executable file → Normal file
|
@ -1,9 +1,12 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT
|
AC_INIT
|
||||||
AC_CONFIG_SRCDIR([bvi.c])
|
AC_CONFIG_SRCDIR([bvi.c])
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
|
||||||
|
|
||||||
dnl On SunOS4 systems you have to use the /usr/5bin/cc compiler
|
dnl On SunOS4 systems you have to use the /usr/5bin/cc compiler
|
||||||
dnl to get the SYSV curses library:
|
dnl to get the SYSV curses library:
|
||||||
|
@ -37,6 +40,7 @@ AC_PROG_INSTALL
|
||||||
dnl Check for typedefs
|
dnl Check for typedefs
|
||||||
AC_CHECK_SIZEOF(int)
|
AC_CHECK_SIZEOF(int)
|
||||||
AC_CHECK_SIZEOF(long)
|
AC_CHECK_SIZEOF(long)
|
||||||
|
AC_CHECK_SIZEOF(long long)
|
||||||
AC_CHECK_SIZEOF(void *)
|
AC_CHECK_SIZEOF(void *)
|
||||||
|
|
||||||
AC_CHECK_TYPE(size_t, unsigned int)
|
AC_CHECK_TYPE(size_t, unsigned int)
|
||||||
|
@ -58,24 +62,29 @@ AC_ARG_WITH(ncurses,
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CHECK_HEADER(ncurses.h,
|
AC_CHECK_HEADER([ncurses.h],[
|
||||||
AC_CHECK_LIB(ncurses, initscr,
|
AC_SEARCH_LIBS([initscr], [ncurses],[
|
||||||
AC_DEFINE(HAVE_NCURSES_H) LIBS="${LIBS} -lncurses",
|
AC_DEFINE(HAVE_NCURSES_H)
|
||||||
AC_CHECK_LIB(curses, initscr,
|
AC_SEARCH_LIBS([tputs], [tinfo])], [
|
||||||
AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses",
|
AC_SEARCH_LIBS([initscr], [curses],[
|
||||||
AC_MSG_ERROR([bvi requires the curses library]))),
|
AC_DEFINE(HAVE_CURSES_H)
|
||||||
AC_CHECK_HEADER(curses.h,
|
AC_SEARCH_LIBS([tputs], [tinfo])],[
|
||||||
AC_CHECK_LIB(curses, initscr,
|
AC_MSG_ERROR([bvi requires the curses library])])])],[
|
||||||
AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses",
|
AC_CHECK_HEADER([curses.h],[
|
||||||
AC_MSG_ERROR([bvi requires the curses library])),
|
AC_SEARCH_LIBS([initscr], [curses], [
|
||||||
AC_MSG_ERROR([bvi requires the curses library])))
|
AC_DEFINE(HAVE_CURSES_H)],[
|
||||||
|
AC_MSG_ERROR([bvi requires the curses library])])],[
|
||||||
|
AC_MSG_ERROR([bvi requires the curses library])])])
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
dnl AC_TYPE_SIZE_T
|
dnl AC_TYPE_SIZE_T
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
dnl AC_TYPE_SIGNAL
|
dnl AC_TYPE_SIGNAL
|
||||||
AC_CHECK_FUNCS(strdup strtol strerror memmove)
|
AC_CHECK_FUNCS(strdup strtol strtoll strerror memmove)
|
||||||
|
AC_FUNC_FSEEKO
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_REALLOC
|
||||||
|
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
|
||||||
AC_INIT(bvi.c)
|
|
||||||
|
|
||||||
dnl Checks for programs.
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_LN_S
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
|
|
||||||
dnl Checks for libraries.
|
|
||||||
dnl Replace `main' with a function in -lcurses:
|
|
||||||
AC_CHECK_LIB(curses, main)
|
|
||||||
dnl Replace `main' with a function in -lncurses:
|
|
||||||
AC_CHECK_LIB(ncurses, main)
|
|
||||||
|
|
||||||
dnl Checks for header files.
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_CHECK_HEADERS(fcntl.h unistd.h)
|
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
AC_TYPE_SIZE_T
|
|
||||||
|
|
||||||
dnl Checks for library functions.
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
AC_CHECK_FUNCS(strdup strtol)
|
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
|
162
edit.c
|
@ -9,8 +9,10 @@
|
||||||
* 2000-07-15 V 1.3.0 final
|
* 2000-07-15 V 1.3.0 final
|
||||||
* 2001-12-07 V 1.3.1
|
* 2001-12-07 V 1.3.1
|
||||||
* 2003-07-04 V 1.3.2
|
* 2003-07-04 V 1.3.2
|
||||||
|
* 2006-04-05 V 1.3.3 alpha - binary representation
|
||||||
|
* 2014-09-30 V 1.4.0
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
#include "bvi.h"
|
#include "bvi.h"
|
||||||
#include "set.h"
|
#include "set.h"
|
||||||
|
|
||||||
extern int precount;
|
extern long precount;
|
||||||
|
|
||||||
char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",
|
char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",
|
||||||
" BS", "TAB", " NL", "HOM", "CLR", " CR", " ^N", " ^O",
|
" BS", "TAB", " NL", "HOM", "CLR", " CR", " ^N", " ^O",
|
||||||
|
@ -42,7 +44,8 @@ char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
|
||||||
"CAN", " EM", "SUB", "ESC", " FS", " GS", " RS", " US",
|
"CAN", " EM", "SUB", "ESC", " FS", " GS", " RS", " US",
|
||||||
"DEL" };
|
"DEL" };
|
||||||
char tmpbuf[10];
|
char tmpbuf[10];
|
||||||
char linbuf[256];
|
char linbuf[16384];
|
||||||
|
long hl_spat = 0;
|
||||||
|
|
||||||
static char getcbuff[BUFFER];
|
static char getcbuff[BUFFER];
|
||||||
static char *getcnext = NULL;
|
static char *getcnext = NULL;
|
||||||
|
@ -113,7 +116,9 @@ edit(mode)
|
||||||
setcur();
|
setcur();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (ch == KEY_BACKSPACE || ch == BVICTRL('H')) {
|
if (ch == KEY_BACKSPACE
|
||||||
|
|| ch == ASCII_DEL
|
||||||
|
|| ch == BVICTRL('H')) {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
len--;
|
len--;
|
||||||
count--;
|
count--;
|
||||||
|
@ -275,7 +280,7 @@ escape:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Do the f, F, t ot T command
|
/* Do the f, F, t or T command
|
||||||
* If flag == 1 save the character in rep_buf
|
* If flag == 1 save the character in rep_buf
|
||||||
* else setpage()
|
* else setpage()
|
||||||
*/
|
*/
|
||||||
|
@ -290,14 +295,30 @@ do_ft(ch, flag)
|
||||||
PTR ptr;
|
PTR ptr;
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
/*
|
||||||
case 1: beep();
|
case 1: beep();
|
||||||
return NULL; /* no previous command */
|
return NULL; no previous command
|
||||||
case -1: if (chp == 'f' || chp == 't') dir = BACKWARD;
|
case -1: if (chp == 'f' || chp == 't') dir = BACKWARD;
|
||||||
else dir = FORWARD;
|
else dir = FORWARD;
|
||||||
break; /* same again */
|
break;
|
||||||
case 0: if (chp == 'f' || chp == 't') dir = FORWARD;
|
case 0: if (chp == 'f' || chp == 't') dir = FORWARD;
|
||||||
else dir = BACKWARD;
|
else dir = BACKWARD;
|
||||||
break; /* same again */
|
break;
|
||||||
|
*/
|
||||||
|
case -1: if (chp == 1) {
|
||||||
|
beep();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (chp == 'f' || chp == 't') dir = BACKWARD;
|
||||||
|
else dir = FORWARD;
|
||||||
|
break;
|
||||||
|
case 0: if (chp == 1) {
|
||||||
|
beep();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (chp == 'f' || chp == 't') dir = FORWARD;
|
||||||
|
else dir = BACKWARD;
|
||||||
|
break;
|
||||||
default: chp = ch;
|
default: chp = ch;
|
||||||
if (chp == 'f' || chp == 't') dir = FORWARD;
|
if (chp == 'f' || chp == 't') dir = FORWARD;
|
||||||
else dir = BACKWARD;
|
else dir = BACKWARD;
|
||||||
|
@ -324,7 +345,10 @@ do_ft(ch, flag)
|
||||||
if (ptr < mem) break;
|
if (ptr < mem) break;
|
||||||
}
|
}
|
||||||
} while (--precount > 0);
|
} while (--precount > 0);
|
||||||
|
/*
|
||||||
if (*ptr == chi) {
|
if (*ptr == chi) {
|
||||||
|
*/
|
||||||
|
if (ptr >= mem && ptr <= maxpos) {
|
||||||
if (loc == HEX) toggle();
|
if (loc == HEX) toggle();
|
||||||
if (chp == 't') ptr--;
|
if (chp == 't') ptr--;
|
||||||
if (chp == 'T') ptr++;
|
if (chp == 'T') ptr++;
|
||||||
|
@ -434,15 +458,20 @@ setcur()
|
||||||
void
|
void
|
||||||
statpos()
|
statpos()
|
||||||
{
|
{
|
||||||
|
char bin_val [9];
|
||||||
unsigned char Char1;
|
unsigned char Char1;
|
||||||
|
int i;
|
||||||
off_t bytepos;
|
off_t bytepos;
|
||||||
char string[30], str[6];
|
char string[MAXCMD+1], str[6];
|
||||||
|
|
||||||
if (!P(P_MO)) return;
|
if (!P(P_MO)) return;
|
||||||
bytepos = current - mem;
|
bytepos = current - mem;
|
||||||
if (bytepos >= filesize) {
|
if (bytepos >= filesize) {
|
||||||
mvaddstr(maxy, status, " ");
|
// mvaddstr(maxy, status, " ");
|
||||||
return; }
|
move(maxy, status);
|
||||||
|
for (i = status; i < maxx; i++) addch(' ');
|
||||||
|
return;
|
||||||
|
}
|
||||||
Char1 = *(mem + bytepos);
|
Char1 = *(mem + bytepos);
|
||||||
|
|
||||||
if (isprint(Char1)) {
|
if (isprint(Char1)) {
|
||||||
|
@ -453,11 +482,22 @@ statpos()
|
||||||
} else if (Char1 == 127) {
|
} else if (Char1 == 127) {
|
||||||
if (P(P_US)) strcpy(str, contru[32]);
|
if (P(P_US)) strcpy(str, contru[32]);
|
||||||
else strcpy(str, contrd[32]);
|
else strcpy(str, contrd[32]);
|
||||||
} else strcpy(str, " ");
|
} else {
|
||||||
|
strcpy(str, " ");
|
||||||
sprintf(string, "%08lX \\%03o 0x%02X %3d %3s",
|
}
|
||||||
(long)(bytepos + P(P_OF)), Char1, Char1, Char1, str);
|
for (i = 0; i < 8; ++i) {
|
||||||
|
if(Char1 & (1<<i)) {
|
||||||
|
bin_val[7-i] = '1';
|
||||||
|
} else {
|
||||||
|
bin_val[7-i] = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bin_val[8] = '\0';
|
||||||
|
|
||||||
|
statsize = sprintf(string, "%08llX %s \\%03o 0x%02X %3d %3s",
|
||||||
|
(long long)(bytepos + P(P_OF)), bin_val, Char1, Char1, Char1, str);
|
||||||
attrset(A_BOLD);
|
attrset(A_BOLD);
|
||||||
|
status = maxx - 1 - statsize;
|
||||||
mvaddstr(maxy, status, string);
|
mvaddstr(maxy, status, string);
|
||||||
attrset(A_NORMAL);
|
attrset(A_NORMAL);
|
||||||
}
|
}
|
||||||
|
@ -468,32 +508,82 @@ printline(mempos, scpos)
|
||||||
PTR mempos;
|
PTR mempos;
|
||||||
int scpos;
|
int scpos;
|
||||||
{
|
{
|
||||||
int print_pos;
|
/* int print_pos; */
|
||||||
unsigned char Zeichen;
|
PTR hl_start = 0;
|
||||||
|
PTR hl_end = 0;
|
||||||
|
PTR f_start = 0;
|
||||||
|
PTR f_end = 0;
|
||||||
|
int print_pos = 0, mv_pos = 0;
|
||||||
|
unsigned char cur_ch;
|
||||||
|
|
||||||
if (mempos > maxpos) {
|
if (mempos > maxpos) {
|
||||||
strcpy(linbuf, "~ ");
|
strcpy(linbuf, "~ ");
|
||||||
} else {
|
} else {
|
||||||
sprintf(linbuf, addr_form, (long)(mempos - mem + P(P_OF)));
|
|
||||||
|
sprintf(linbuf, addr_form, (long long)(mempos - mem + P(P_OF)));
|
||||||
*string = '\0';
|
*string = '\0';
|
||||||
}
|
}
|
||||||
|
mvaddstr(scpos, mv_pos, linbuf);
|
||||||
|
mv_pos = AnzAdd;
|
||||||
|
*linbuf = '\0';
|
||||||
|
if (hl_spat) {
|
||||||
|
f_start = (mempos - Anzahl) < mem ? mem : (mempos - Anzahl);
|
||||||
|
f_end = mempos + (2 * Anzahl);
|
||||||
|
hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end);
|
||||||
|
}
|
||||||
|
|
||||||
for (print_pos = 0; print_pos < Anzahl; print_pos++) {
|
for (print_pos = 0; print_pos < Anzahl; print_pos++) {
|
||||||
|
if (hl_spat) {
|
||||||
|
while (hl_start != NULL) {
|
||||||
|
if (hl_start < mempos) {
|
||||||
|
if (hl_end < mempos) {
|
||||||
|
f_start = hl_start + 1;
|
||||||
|
hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end);
|
||||||
|
} else {
|
||||||
|
attrset(A_STANDOUT); /* start out highlighted */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (hl_start >= mempos) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hl_start != NULL) {
|
||||||
|
if ((hl_start - mempos) == print_pos) {
|
||||||
|
mvaddstr(scpos, mv_pos, linbuf);
|
||||||
|
mv_pos = AnzAdd + (3 * print_pos);
|
||||||
|
*linbuf = '\0';
|
||||||
|
attrset(A_STANDOUT);
|
||||||
|
}
|
||||||
|
if ((hl_end - mempos) == print_pos) {
|
||||||
|
mvaddstr(scpos, mv_pos, linbuf);
|
||||||
|
*linbuf = '\0';
|
||||||
|
mv_pos = AnzAdd + (3 * print_pos);
|
||||||
|
f_start = hl_end;
|
||||||
|
hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end);
|
||||||
|
if (f_start != hl_start) {
|
||||||
|
attrset(A_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mempos + print_pos >= maxpos) {
|
if (mempos + print_pos >= maxpos) {
|
||||||
sprintf(tmpbuf, " ");
|
sprintf(tmpbuf, " ");
|
||||||
Zeichen = ' ';
|
cur_ch = ' ';
|
||||||
} else {
|
} else {
|
||||||
Zeichen = *(mempos + print_pos);
|
cur_ch = *(mempos + print_pos);
|
||||||
sprintf(tmpbuf, "%02X ", Zeichen);
|
sprintf(tmpbuf, "%02X ", cur_ch);
|
||||||
}
|
}
|
||||||
strcat(linbuf, tmpbuf);
|
strcat(linbuf, tmpbuf);
|
||||||
if (isprint(Zeichen))
|
if (isprint(cur_ch))
|
||||||
*(string + print_pos) = Zeichen;
|
*(string + print_pos) = cur_ch;
|
||||||
else
|
else
|
||||||
*(string + print_pos) = '.';
|
*(string + print_pos) = '.';
|
||||||
}
|
}
|
||||||
|
mvaddstr(scpos, mv_pos, linbuf);
|
||||||
|
mv_pos = AnzAdd + (3 * print_pos);
|
||||||
|
attrset(A_NORMAL);
|
||||||
*(string + Anzahl) = '\0';
|
*(string + Anzahl) = '\0';
|
||||||
strcat(linbuf, string);
|
mvaddstr(scpos, mv_pos, string);
|
||||||
mvaddstr(scpos, 0, linbuf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -639,11 +729,22 @@ fileinfo(fname)
|
||||||
char *fname;
|
char *fname;
|
||||||
{
|
{
|
||||||
off_t bytepos;
|
off_t bytepos;
|
||||||
char fstatus[64];
|
char fstatus[MAXCMD];
|
||||||
|
char *string;
|
||||||
|
|
||||||
if (fname) {
|
if (fname) {
|
||||||
|
string = malloc((size_t)strlen(fname) + MAXCMD);
|
||||||
|
if (string == NULL) {
|
||||||
|
emsg("Out of memory");
|
||||||
|
return;
|
||||||
|
}
|
||||||
sprintf(string, "\"%s\" ", fname);
|
sprintf(string, "\"%s\" ", fname);
|
||||||
} else {
|
} else {
|
||||||
|
string = malloc(MAXCMD);
|
||||||
|
if (string == NULL) {
|
||||||
|
emsg("Out of memory");
|
||||||
|
return;
|
||||||
|
}
|
||||||
strcpy(string, "No file ");
|
strcpy(string, "No file ");
|
||||||
}
|
}
|
||||||
if (filemode != NEW && filemode != REGULAR)
|
if (filemode != NEW && filemode != REGULAR)
|
||||||
|
@ -652,13 +753,16 @@ fileinfo(fname)
|
||||||
if (edits) strcat(string, "[Modified] ");
|
if (edits) strcat(string, "[Modified] ");
|
||||||
if (filesize) {
|
if (filesize) {
|
||||||
bytepos = (pagepos + y * Anzahl + xpos()) - mem + 1L;
|
bytepos = (pagepos + y * Anzahl + xpos()) - mem + 1L;
|
||||||
sprintf(fstatus, "byte %lu of %lu --%lu%%--", (long)bytepos,
|
sprintf(fstatus, "byte %llu of %llu --%llu%%--",
|
||||||
(long)filesize, (long)(bytepos * 100L / filesize));
|
(unsigned long long)bytepos,
|
||||||
|
(unsigned long long)filesize,
|
||||||
|
(unsigned long long)(bytepos * 100L / filesize));
|
||||||
strcat(string, fstatus);
|
strcat(string, fstatus);
|
||||||
} else {
|
} else {
|
||||||
strcat(string, " 0 bytes");
|
strcat(string, " 0 bytes");
|
||||||
}
|
}
|
||||||
msg(string);
|
msg(string);
|
||||||
|
free(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -856,7 +960,7 @@ do_ins_chg(start, arg, mode)
|
||||||
repaint();
|
repaint();
|
||||||
goto mfree;
|
goto mfree;
|
||||||
}
|
}
|
||||||
do_append(count, tempbuf);
|
do_append((off_t)count, tempbuf);
|
||||||
memcpy(undo_buf, tempbuf, count);
|
memcpy(undo_buf, tempbuf, count);
|
||||||
repaint();
|
repaint();
|
||||||
break;
|
break;
|
||||||
|
|
159
html/bmore.html
|
@ -1,159 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: bmore</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<font color="#ffffff" class="thl">bmore<br></font>
|
|
||||||
<a class="ths" href="bmore_cmd.html">Commands</a><br>
|
|
||||||
<a class="ths" href="bmore_opt.html">Options</a><br>
|
|
||||||
<a class="ths" href="man_bmore.html">man - Page</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">bmore</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>bmore</strong> is a filter that displays the contents of a binary
|
|
||||||
file on the terminal, one screenful at a time. It normally pauses after each
|
|
||||||
screenful, and prints <b>--More--</b> at the bottom of the screen.
|
|
||||||
<strong>bmore</strong> provides a two-line over lap between screens for
|
|
||||||
continuity. If bmore is reading from a file rather than a pipe,
|
|
||||||
the percentage of characters displayed so far is also shown.
|
|
||||||
<p>
|
|
||||||
<strong>bmore</strong> scrolls up to display one more screen line in
|
|
||||||
response to a <font color="#aaaaaa"><b>RETURN</b></font> character; it displays another
|
|
||||||
screenful in response to a <font color="#aaaaaa"><b>SPACE</b></font> character. Other commands are listed below.
|
|
||||||
<P>
|
|
||||||
The screen is divided in three sections or panes: 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 (can be changed with the <b>-n</b> option).
|
|
||||||
<p>
|
|
||||||
Note that (as one would expect) the first
|
|
||||||
byte has the offset 0 (zero).
|
|
||||||
<P>
|
|
||||||
<center>
|
|
||||||
<table width="10" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td bgcolor="#ffccff"><pre class="examp">
|
|
||||||
000000
|
|
||||||
00000C
|
|
||||||
000018
|
|
||||||
000024
|
|
||||||
000030
|
|
||||||
00003C
|
|
||||||
000048
|
|
||||||
000054
|
|
||||||
000060
|
|
||||||
*
|
|
||||||
00016C
|
|
||||||
000178
|
|
||||||
000184
|
|
||||||
000190
|
|
||||||
00009C</pre></td><td bgcolor="#ccffcc"><pre class="examp">
|
|
||||||
7F 45 4C 46 01 01
|
|
||||||
00 00 00 00 01 00
|
|
||||||
00 00 00 00 00 00
|
|
||||||
00 00 00 00 34 00
|
|
||||||
0C 00 09 00 00 00
|
|
||||||
00 00 00 00 55 89
|
|
||||||
53 C7 45 A4 00 00
|
|
||||||
00 00 00 83 7D 08
|
|
||||||
8C 02 00 00 E9 6F
|
|
||||||
|
|
||||||
00 00 00 00 6A 03
|
|
||||||
45 08 50 E8 FC FF
|
|
||||||
0C 85 D2 75 17 6A
|
|
||||||
E9 43 02 00 00 8D
|
|
||||||
0C 85 D2 75 0D C7</pre></td><td bgcolor="#ccffcc"><pre class="examp">
|
|
||||||
01 00 00 00 00 00
|
|
||||||
03 00 01 00 00 00
|
|
||||||
00 00 0C 07 00 00
|
|
||||||
00 00 00 00 28 00
|
|
||||||
00 00 00 00 00 00
|
|
||||||
E5 83 EC 68 57 56
|
|
||||||
00 00 C7 45 A0 01
|
|
||||||
00 75 13 6A 00 E8
|
|
||||||
02 00 00 8D B4 26
|
|
||||||
|
|
||||||
68 90 00 00 00 8B
|
|
||||||
FF FF 89 C2 83 C4
|
|
||||||
01 E8 60 02 00 00
|
|
||||||
74 26 00 8D BC 27
|
|
||||||
45 A0 00 00 00 00</pre></td><td bgcolor="#ffcccc"><pre class="examp">
|
|
||||||
.ELF........
|
|
||||||
............
|
|
||||||
............
|
|
||||||
....4.....(.
|
|
||||||
............
|
|
||||||
....U....hWV
|
|
||||||
S.E......E..
|
|
||||||
....}..u.j..
|
|
||||||
.....o.....&
|
|
||||||
|
|
||||||
....j.h.....
|
|
||||||
E.P.........
|
|
||||||
...u.j..`...
|
|
||||||
.C....t&...'
|
|
||||||
...u..E.....</pre></td></tr>
|
|
||||||
<tr bgcolor="#ffffcc"><td colspan="4" class="examp">
|
|
||||||
<font class="inv">--More--(5%) </font>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</center>
|
|
||||||
<p>
|
|
||||||
Equal lines will only displayed once, a star (*) is the placeholder
|
|
||||||
for one or more lines equal to the line above.
|
|
||||||
</p>
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: October 13<sup>th</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,116 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Commands</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Commands<br></font>
|
|
||||||
<a class="ths" href="bmore_opt.html">Options</a><br>
|
|
||||||
<a class="ths" href="man_bmore.html">man - Page</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">bmore</font>
|
|
||||||
<br><font class="sub">Commands</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
|
|
||||||
|
|
||||||
Most commands optionally preceded by integer argument <I>k</I>. Defaults in brackets.
|
|
||||||
Star (*) indicates argument becomes new default.
|
|
||||||
<P>
|
|
||||||
<TABLE>
|
|
||||||
<TR><TH><FONT COLOR=#888888>SPACE</FONT></TH>
|
|
||||||
<TD>Display next <I>k</I> lines of bytes </TD><TD>current screen size</TD></TR>
|
|
||||||
<TR><TH>z</TH><TD>Display next <I>k</I> lines of bytes </TD>
|
|
||||||
<TD>current screen size*</TD></TR>
|
|
||||||
<TR><TH><FONT COLOR=#888888>RETURN</FONT></TH>
|
|
||||||
<TD>Display next <I>k</I> lines of bytes </TD><TD>1*</TD></TR>
|
|
||||||
<TR><TD ALIGN=CENTER><B>d</B> or <B><FONT COLOR=#888888>CTRL</FONT> D</B></TH>
|
|
||||||
<TD>Scroll <I>k</I> lines </TD><TD>current scroll size, initially 11*</TD></TR>
|
|
||||||
<TR><TD ALIGN=CENTER><B>q</B> or <B>Q</B> or Interrupt</TD>
|
|
||||||
<TD>Exit from bmore</TD></TR>
|
|
||||||
<TR><TH>s</TH>
|
|
||||||
<TD>Skip forward <I>k</I> lines of bytes </TD><TD>1</TD></TR>
|
|
||||||
<TR><TH>f</TH>
|
|
||||||
<TD>Skip forward <I>k</I> screenfuls of bytes </TD><TD>1</TD></TR>
|
|
||||||
<TR><TD ALIGN=CENTER><B>b</B> or <B><FONT COLOR=#888888>CTRL</FONT> B</B></TH>
|
|
||||||
<TD>Skip backwards <I>k</I> screenfuls of bytes </TD><TD>1</TD></TR>
|
|
||||||
<TR><TH>'</TH>
|
|
||||||
<TD>Go to place where previous search started</TD></TR>
|
|
||||||
<TR><TH>=</TH>
|
|
||||||
<TD>Display current byte number</TD></TR>
|
|
||||||
<TR><TH>/<FONT COLOR=#FF0000>regular expr</FONT></TH>
|
|
||||||
<TD>Search for <I>k</I><SUP>th</SUP> occurrence of ascii regular expr </TD><TD>1</TD></TR>
|
|
||||||
<TR><TH>\<FONT COLOR=#FF0000>regular expr</FONT></TH>
|
|
||||||
<TD>Search for <I>k</I><SUP>th</SUP> occurrence of binary regular expr </TD><TD>1</TD></TR>
|
|
||||||
<TR><TH>n</TH>
|
|
||||||
<TD>Search for <I>k</I><SUP>th</SUP> occurrence of last r.e </TD><TD>1</TD></TR>
|
|
||||||
<TR><TD ALIGN=CENTER><B>!<I>cmd</I></B> or <B>:!<I>cmd</I></B></TH>
|
|
||||||
<TD>Execute <I>cmd</I> in a subshell</TD></TR>
|
|
||||||
<TR><TH>v</TH>
|
|
||||||
<TD>Start up <B>bvi</B> at current position</TD></TR>
|
|
||||||
<TR><TH>w</TH>
|
|
||||||
<TD>Start up <B>bvi</B> reading only a screenful of bytes</TD><TD>screen</TD></TR>
|
|
||||||
<TR><TH><FONT COLOR=#888888>CTRL</FONT> L</TH>
|
|
||||||
<TD>Redraw screen</TD></TR>
|
|
||||||
<TR><TH>:n</TH>
|
|
||||||
<TD>Go to <I>k</I><SUP>th</SUP> next file</TD><TD>1</TD></TR>
|
|
||||||
<TR><TH>:p</TH>
|
|
||||||
<TD>Go to <I>k</I><SUP>th</SUP> previous file</TD><TD>1</TD></TR>
|
|
||||||
<TR><TH>:f</TH>
|
|
||||||
<TD>Display current file name and byte position</TD></TR>
|
|
||||||
<TR><TH>.</TH>
|
|
||||||
<TD>Repeat previous command</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<P>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: Fri Jun 30 22:05:32 CEST 2000 by Gerhard Bürgmann</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,142 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Command Line Options</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
<a class="ths" href="bmore_cmd.html">Commands</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Options<br></font>
|
|
||||||
<a class="ths" href="man_bmore.html">man - Page</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">bmore</font>
|
|
||||||
<br><font class="sub">Command Line Options</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<table>
|
|
||||||
<tr><th valign="top">-a</th><td>ASCII mode</td></tr>
|
|
||||||
<tr><th valign="top">-c</th><td>Clear before displaying. Redrawing the screen
|
|
||||||
instead of scrolling. Can be useful, if you change the number of
|
|
||||||
displayed lines.</td></tr>
|
|
||||||
<tr><th valign="top">-d</th><td>Display error messages rather than ringing the
|
|
||||||
terminal bell if an unrecognized command is used.
|
|
||||||
This is helpful for inexperienced users.
|
|
||||||
</td></tr>
|
|
||||||
<tr><th valign="top">-i</th><td>Ignore case for searching.</td></tr>
|
|
||||||
<tr><th valign="top"><nobreak>-n <i>lines</i></nobreak></th>
|
|
||||||
<td>Displays the indicated number of <i>lines</i> in each screenful,
|
|
||||||
rather than the default (the number of lines in the terminal screen less two).</td></tr>
|
|
||||||
<tr><th valign="top">-w <i>cols</i></th><td>
|
|
||||||
Display number of <i>cols</i> (bytes of data) in each line.</td></tr>
|
|
||||||
<tr><th valign="top">+<I>linenumber</i></th>
|
|
||||||
<td>Start up at <I>linenumber</i></td></tr>
|
|
||||||
<tr><th valign="top">+/<font color="#FF0000">ASCII-pattern</font></th>
|
|
||||||
<td>Start up at the line containing the regular expression
|
|
||||||
<font color="#FF0000"><b>ASCII-pattern</b></font></td></tr>
|
|
||||||
<tr><th valign="top">+\<font color="#FF0000">HEX-pattern</font></th>
|
|
||||||
<td>Start up at the line containing the regular expression
|
|
||||||
<font color="#FF0000"><b>HEX-pattern</b></font></td></tr>
|
|
||||||
</table>
|
|
||||||
<p>
|
|
||||||
This is the default display:</p>
|
|
||||||
<center>
|
|
||||||
<table width="10" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td bgcolor=#ccFFff>
|
|
||||||
<pre class="examp">
|
|
||||||
00000000 7F 45 4C 46 01 01 01 00 00 00 00 00 00 00 00 00 .ELF............
|
|
||||||
00000010 01 00 03 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
|
|
||||||
00000020 F4 60 00 00 00 00 00 00 34 00 00 00 00 00 28 00 .`......4.....(.
|
|
||||||
00000030 0F 00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
|
||||||
00000040 55 89 E5 68 04 00 00 00 68 4C 00 00 00 68 00 00 U..h....hL...h..
|
|
||||||
00000050 00 00 E8 FC FF FF FF 6A 01 E8 FC FF FF FF 89 F6 .......j........
|
|
||||||
00000060 55 89 E5 83 EC 14 57 56 53 8B 7D 0C C7 45 FC 00 U.....WVS.}..E..
|
|
||||||
00000070 00 00 00 C7 45 F8 00 00 00 00 C7 45 F4 00 00 00 ....E......E....
|
|
||||||
00000080 00 BE 01 00 00 00 6A 2F 8B 07 50 E8 FC FF FF FF ......j/..P.....
|
|
||||||
00000090 83 C4 08 85 C0 74 09 40 EB 08 8D B6 00 00 00 00 .....t.@........
|
|
||||||
000000A0 8B 07 50 68 04 00 00 00 E8 FC FF FF FF 83 C4 08 ..Ph............
|
|
||||||
000000B0 68 85 00 00 00 68 04 00 00 00 E8 FC FF FF FF 83 h....h..........
|
|
||||||
000000C0 C4 08 39 75 08 0F 8E 35 01 00 00 8B 04 B7 89 45 ..9u...5.......E
|
|
||||||
000000D0 EC 8A 10 80 FA 2B 0F 84 94 00 00 00 80 FA 2D 0F .....+........-.
|
|
||||||
000000E0 85 EB 00 00 00 BB 01 00 00 00 80 78 01 00 0F 84 ...........x....
|
|
||||||
000000F0 D1 00 00 00 8B 4D EC 8A 04 0B 3C 64 74 32 7F 10 .....M....^dt2..</pre>
|
|
||||||
<font class="inv">--More--(5%) </font>
|
|
||||||
</td></tr></table>
|
|
||||||
</center><p>
|
|
||||||
With the <tt><b>-a</b></tt> option the display looks like this:
|
|
||||||
</p>
|
|
||||||
<center>
|
|
||||||
<table width="10" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td bgcolor=#ccFFcc>
|
|
||||||
<pre class="examp">
|
|
||||||
00000000 .ELF....................@...4... .......4. ...(.........4...4...
|
|
||||||
00000040 4...............................................................
|
|
||||||
00000080 .....1...1...............1..............,................4......
|
|
||||||
000000C0 .................................... ... .........../lib/ld-linu
|
|
||||||
00000100 x.so.2..............GNU.................%...8.......4... .......
|
|
||||||
00000140 ........,.......6.......................3...!...........%...1...
|
|
||||||
00000180 ....7..............."...........2...&...+...)...................
|
|
||||||
000001C0 ................................................................
|
|
||||||
00000200 ................................................................
|
|
||||||
00000240 ............................#...........(...................'...
|
|
||||||
00000280 *...$.......-.../.......0.......5...................U...........
|
|
||||||
000002C0 .... .......................g.......(...........................
|
|
||||||
00000300 ............t...-...........5...............o...............$...
|
|
||||||
00000340 ........................$...............4...............D...H...
|
|
||||||
00000380 ....y...T...............d...............t...........1...d.......
|
|
||||||
000003C0 ................................-...................j...........</pre>
|
|
||||||
<font class="inv">--More--(18%) </font>
|
|
||||||
</td></tr></table>
|
|
||||||
</center>
|
|
||||||
<p> </p>
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: January 4<sup>th</sup> 2004 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
11
html/bvi.css
|
@ -1,11 +0,0 @@
|
||||||
TD {font-family: Helvetica, Arial, sans-serif;}
|
|
||||||
TH {font-family: Helvetica, Arial, sans-serif;}
|
|
||||||
STRONG {color:red;}
|
|
||||||
.thl {font-family: Helvetica, Arial Narrow, sans-serif; font-size: 12pt; font-weight: bold; text-decoration:none;}
|
|
||||||
.ths {font-family: Helvetica, Arial Narrow, sans-serif; font-size: 10pt; text-decoration:none;}
|
|
||||||
.btop {text-decoration:none; color:black;}
|
|
||||||
.examp {font-family: Courier, monospace;}
|
|
||||||
.inv {font-family: Courier, monospace; color: rgb(255,255,255); background-color: rgb(0,0,0);}
|
|
||||||
.head {font-family: Helvetica, Arial, sans-serif; font-size: 22pt; font-weight: bold; text-decoration:none;}
|
|
||||||
.sub {font-family: Helvetica, Arial, sans-serif; font-size: 16pt; font-weight: bold;}
|
|
||||||
.new {font-family: Times, serif; font-weight: bold; font-size: 28pt; color: red;}
|
|
209
html/colon.html
|
@ -1,209 +0,0 @@
|
||||||
<HTML><HEAD>
|
|
||||||
<TITLE>BVI: Colon (ex) Commands</TITLE>
|
|
||||||
<LINK REL=STYLESHEET TYPE="text/css" HREF="bvi.css">
|
|
||||||
</HEAD><BODY BGCOLOR="#ffffff">
|
|
||||||
<A NAME="top"></A>
|
|
||||||
|
|
||||||
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
|
||||||
<TR><TD WIDTH=99%>
|
|
||||||
<A CLASS=head HREF="overview.html">Command Overview</A>
|
|
||||||
<BR><FONT CLASS=sub>Colon (ex) Commands</FONT>
|
|
||||||
</TD><TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=116 ROWSPAN=2>
|
|
||||||
<A HREF="index.html">
|
|
||||||
<IMG SRC="gif/bvi_s.gif" ALT="BVI" WIDTH="116" HEIGHT="62" BORDER=0></A>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD VALIGN=BOTTOM>
|
|
||||||
<HR NOSHADE>
|
|
||||||
</TD></TR></TABLE>
|
|
||||||
<P>
|
|
||||||
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| Colon (ex) Cmds
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
When forming a colon command, the first character, the colon, can be
|
|
||||||
followed by zero, one or two addresses. These addresses are byte
|
|
||||||
addresses, in contrast to vi, which uses line addresses.<BR>
|
|
||||||
The byte addresses can be given in decimal notation or, with a
|
|
||||||
leading zero, in hexadecimal notation. If you have specified an
|
|
||||||
address offset (e.g. <B>:set offset=256</B>), this offset has to be
|
|
||||||
added to the byte addresses.<BR>
|
|
||||||
Without an address, the whole file is affected or the current cursor
|
|
||||||
position is used (depending of the command).
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
<TABLE BORDER=1 CELLPADDING=4>
|
|
||||||
<TR><TH>Address</TH><TH>Corresponding bytes</TH></TR>
|
|
||||||
<TR><TH>.</TH><TD>The current byte</TD></TR>
|
|
||||||
<TR><TH>7</TH><TD>The seventh byte of file (if offset=0)</TD></TR>
|
|
||||||
<TR><TH>.-<I>n</I></TH><TD><I>n</I> bytes before the current byte</TD></TR>
|
|
||||||
<TR><TH>.+<I>n</I></TH><TD><I>n</I> bytes after the current byte</TD></TR>
|
|
||||||
<TR><TH>'<I>x</I></TH><TD>The byte marked with <I>x</I></TD></TR>
|
|
||||||
<TR><TH>^</TH><TD>The first byte in file</TD></TR>
|
|
||||||
<TR><TH>$</TH><TD>The last byte</TD></TR>
|
|
||||||
<TR><TH>''</TH><TD>The previous current byte</TD></TR>
|
|
||||||
<TR><TH>/pat/</TH><TD>The first byte that matches <I>pat</I></TD></TR>
|
|
||||||
<TR><TH>#12 A4 6F#</TH><TD>The first byte that matches hex pattern</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</CENTER>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
|
|
||||||
<TABLE WIDTH=100%>
|
|
||||||
<TR BGCOLOR=#CCCCCC><TH WIDTH=20%>Command</TH><TH WIDTH=40%>BVI</TH><TH WIDTH=40%>VI</TH></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>File<BR>Commands</TD><TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:w</B><BR>
|
|
||||||
<B>:w</B> %.new<BR>
|
|
||||||
<B>:w</B> filename<BR>
|
|
||||||
<B>:w>></B> existingfile<BR>
|
|
||||||
<B>:w!</B> file<BR>
|
|
||||||
<B>:e</B> newfile<BR>
|
|
||||||
<B>:e!</B><BR>
|
|
||||||
<B>:f</B><BR>
|
|
||||||
<B>:f</B> newname<BR>
|
|
||||||
</TD>
|
|
||||||
<TD>Write to the current file<BR>
|
|
||||||
Write to current.new<BR>
|
|
||||||
Write to filename<BR>
|
|
||||||
Append to existing file<BR>
|
|
||||||
Overwrite existing file<BR>
|
|
||||||
Terminate session and edit <I>newfile</I><BR>
|
|
||||||
Reload the current file<BR>
|
|
||||||
Prints current filename and some additional info<BR>
|
|
||||||
Changes the current filename to <I>newname</I>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=2>Substitute<BR>Commands</TD>
|
|
||||||
<TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:s/pattern/replace/</B><BR>
|
|
||||||
<B>:s/pattern/replace/g</B><BR>
|
|
||||||
<B>:s/pattern/replace/gc</B></TD>
|
|
||||||
<TD>Search for pattern and replace it once<BR>
|
|
||||||
Search for pattern and replace it global<BR>
|
|
||||||
Search for pattern and replace it global conditional (ask)
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<TR><TD>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:s\80 af\ff ff\</B></TD>
|
|
||||||
<TD>Binary search and replace
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<TD BGCOLOR=#FFCCCC>Not available</TD></TR>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Edit<BR>Commands</TD>
|
|
||||||
<TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD VALIGN=TOP><B>:a</B> <I>m</I><BR>
|
|
||||||
<B>:c</B> <I>m</I> <BR>
|
|
||||||
<B>:i</B> <I>m</I></B></TD>
|
|
||||||
<TD>append<BR>
|
|
||||||
change<BR>
|
|
||||||
insert
|
|
||||||
bytes, where <I>m</I> is a(scii), b(inary), d(ecimal), h(exadecimal)
|
|
||||||
or o(ctal). You can type in several (screen) lines of bytes, a line
|
|
||||||
with only a '<B>.</B>' in it terminates the command.
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFCCCC>
|
|
||||||
Usually not available in vi but in ex (without the <I>m</I> - modifier).
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Logical<BR>Operations</TD>
|
|
||||||
<TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:and</B> <I>n</I><BR>
|
|
||||||
<B>:or</B> <I>n</I><BR>
|
|
||||||
<B>:xor</B> <I>n</I><BR>
|
|
||||||
<B>:neg<BR>
|
|
||||||
:not<BR>
|
|
||||||
:sl</B> <I>i</I><BR>
|
|
||||||
<B>:sr</B> <I>i</I><BR>
|
|
||||||
<B>:rr</B> <I>i</I><BR>
|
|
||||||
<B>:rl</B> <I>i</I></TD>
|
|
||||||
<TD>and <I>n</I><BR>
|
|
||||||
or <I>n</I><BR>
|
|
||||||
exclusive or <I>n</I><BR>
|
|
||||||
negate<BR>
|
|
||||||
invert<BR>
|
|
||||||
shift left <I>i</I> bits<BR>
|
|
||||||
shift right <I>i</I> bits<BR>
|
|
||||||
rotate left <I>i</I> bits<BR>
|
|
||||||
rotate right <I>i</I> bits
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFCCCC>
|
|
||||||
Not available.
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=2>Miscellaneous</TD>
|
|
||||||
<TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD>
|
|
||||||
<B>:g</B>/<I>pat</I>/p<BR>
|
|
||||||
<B>:n<BR>
|
|
||||||
:q<BR>
|
|
||||||
:rew<BR>
|
|
||||||
:sh<BR>
|
|
||||||
:so</B> file<BR>
|
|
||||||
<B>:ve<BR>
|
|
||||||
:x<BR>
|
|
||||||
:!</B> <I>command</I><BR>
|
|
||||||
</TD><TD>
|
|
||||||
Global search for pattern <I>pat</I><BR>
|
|
||||||
Next file to edit<BR>
|
|
||||||
Exit session without saving the file<BR>
|
|
||||||
Rewind to first file<BR>
|
|
||||||
spawn a new shell<BR>
|
|
||||||
Read and execute a file with colon commands<BR>
|
|
||||||
Version of the editor<BR>
|
|
||||||
Exit session, save the file if changed<BR>
|
|
||||||
execute a system <I>command</I><BR>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD>Currently not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD>
|
|
||||||
<B>:map</B><BR>
|
|
||||||
<B>:unm</B>(ap)<BR>
|
|
||||||
<B>:ab</B>(breviate)<BR>
|
|
||||||
<B>:una</B>(bbreviate)<BR>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| Colon (ex) Cmds
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<FONT SIZE=-1>
|
|
||||||
<A CLASS="btop" HREF="#top"><IMG BORDER=0 WIDTH=16 HEIGHT=7 SRC="gif/up.gif"
|
|
||||||
ALT="Back to the top">Back to the top</A>
|
|
||||||
</FONT>
|
|
||||||
<HR NOSHADE>
|
|
||||||
<I>Last update: October 30<SUP>th</SUP> 1999 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</I>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY></HTML>
|
|
117
html/cursor.html
|
@ -1,117 +0,0 @@
|
||||||
<HTML><HEAD>
|
|
||||||
<TITLE>BVI: Cursor Movements</TITLE>
|
|
||||||
<LINK REL=STYLESHEET TYPE="text/css" HREF="bvi.css">
|
|
||||||
</HEAD><BODY BGCOLOR="#ffffff">
|
|
||||||
<A NAME="top"></A>
|
|
||||||
|
|
||||||
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
|
||||||
<TR><TD WIDTH=99%>
|
|
||||||
<A CLASS=head HREF="overview.html">Command Overview</A>
|
|
||||||
<BR><FONT CLASS=sub>Cursor Movements</FONT>
|
|
||||||
</TD><TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=116 ROWSPAN=2>
|
|
||||||
<A HREF="index.html">
|
|
||||||
<IMG SRC="gif/bvi_s.gif" ALT="BVI" WIDTH="116" HEIGHT="62" BORDER=0></A>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD VALIGN=BOTTOM>
|
|
||||||
<HR NOSHADE>
|
|
||||||
</TD></TR></TABLE>
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
[ Cursor Movements
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<TABLE WIDTH=100%>
|
|
||||||
<TR BGCOLOR=#CCCCCC><TH WIDTH=20%>Command</TH><TH WIDTH=40%>BVI</TH><TH WIDTH=40%>VI</TH></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Cursor<BR>movements</TD><TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>h, <FONT COLOR=#888888>ARROW_LEFT</FONT></TH>
|
|
||||||
<TD>move cursor one character to the left</TD></TR>
|
|
||||||
<TR><TH>j, +, ^N, ^J, <FONT COLOR=#888888>ARROW_DOWN</FONT>,
|
|
||||||
<FONT COLOR=#888888>RETURN</FONT>
|
|
||||||
</TH><TD>move cursor down one line</TD></TR>
|
|
||||||
<TR><TH>k, -, <FONT COLOR=#888888>ARROW_UP</FONT></TH>
|
|
||||||
<TD>move cursor up one line</TD></TR>
|
|
||||||
<TR><TH>l, <FONT COLOR=#888888>ARROW_RIGHT</FONT>,
|
|
||||||
<FONT COLOR=#888888>SPACE</FONT>
|
|
||||||
</TH><TD>move cursor one character to the right</TD></TR>
|
|
||||||
<TR><TH>H</TH><TD>move cursor to home position, upper left corner of screen</TD></TR>
|
|
||||||
<TR><TH>M</TH><TD>move cursor to the begin of the middle line of the screen</TD></TR>
|
|
||||||
<TR><TH>L</TH><TD>move cursor to the begin of the last line of the screen</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Move to<BR>begin<BR>and end of<BR>(screen) line</TD>
|
|
||||||
<TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>^</TH><TD>move cursor to the first byte of Hex section</TD></TR>
|
|
||||||
<TR><TH>$</TH><TD>move cursor to the last byte of Ascii section</TD></TR>
|
|
||||||
<TR><TH><FONT COLOR=#888888>TAB</FONT></TH><TD>toggle cursor between the same byte in Hex and Ascii section</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> ^ </TH>
|
|
||||||
<TD>move cursor to the first nonblank character of line</TD></TR>
|
|
||||||
<TR><TH>$</TH><TD>move cursor to end of line</TD></TR>
|
|
||||||
<TR><TH>0</TH><TD>move cursor to the real begin of line</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Move<BR>by<BR>words</TD>
|
|
||||||
<TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> w </TH>
|
|
||||||
<TD>forward to next string delimited with a nonprinting char</TD></TR>
|
|
||||||
<TR><TH>b</TH>
|
|
||||||
<TD>back to previous string delimited with a nonprinting char</TD></TR>
|
|
||||||
<TR><TH>e</TH>
|
|
||||||
<TD>end of current word </TD></TR>
|
|
||||||
<TR><TH>W</TH>
|
|
||||||
<TD>forward to next string delimited with a \0 or \n</TD></TR>
|
|
||||||
<TR><TH>B</TH>
|
|
||||||
<TD>back to previous string delimited with a nonprinting char</TD></TR>
|
|
||||||
<TR><TH>E</TH>
|
|
||||||
<TD>end of a blank-delimited word</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> w </TH>
|
|
||||||
<TD>move cursor forward to begin of next word</TD></TR>
|
|
||||||
<TR><TH>e</TH>
|
|
||||||
<TD>move cursor to end of current word</TD></TR>
|
|
||||||
<TR><TH>b</TH>
|
|
||||||
<TD>move cursor back to begin of current or previous word</TD></TR>
|
|
||||||
<TR><TH>W</TH>
|
|
||||||
<TD>move cursor forward to begin of next word, ignoring punctuation</TD>
|
|
||||||
</TR>
|
|
||||||
<TR><TH>B</TH>
|
|
||||||
<TD>move cursor back to begin of last word, ignoring punctuation</TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
</TABLE>
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
[ Cursor Movements
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<FONT SIZE=-1>
|
|
||||||
<A CLASS="btop" HREF="#top"><IMG BORDER=0 WIDTH=16 HEIGHT=7 SRC="gif/up.gif"
|
|
||||||
ALT="Back to the top">Back to the top</A>
|
|
||||||
</FONT>
|
|
||||||
<HR NOSHADE>
|
|
||||||
<I>Last update: October 30<SUP>th</SUP> 1999 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</I>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY></HTML>
|
|
|
@ -1,98 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Download Page</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<font color="#ffffff" class="thl">Download<br></font>
|
|
||||||
<a class="ths" href="new132.html">New in 1.3.2</a><br>
|
|
||||||
<a class="ths" href="new131.html">New in 1.3.1</a><br>
|
|
||||||
<a class="ths" href="new130.html">New in 1.3.0</a><br>
|
|
||||||
<a class="ths" href="new120.html">New in 1.2.0</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Download Page</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
NOTE: All packages are compressed with the GNU gzip program. You
|
|
||||||
can download it from <a href="ftp://ftp.gnu.org/gnu/gzip/">ftp://ftp.gnu.org/gnu/gzip/</a>.
|
|
||||||
<p>
|
|
||||||
Current stable release of bvi is <b>1.3.2</b>
|
|
||||||
(Check out what's <a href="new132.html">new</a>):
|
|
||||||
<p>
|
|
||||||
<h3>Sources</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.2.src.tar.gz">bvi-1.3.2.src.tar.gz</a>
|
|
||||||
(168k)</li>
|
|
||||||
<li><a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.1.src.tar.gz">bvi-1.3.1.src.tar.gz</a>
|
|
||||||
(165k)</li>
|
|
||||||
<li><a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.0.src.tar.gz">bvi-1.3.0.src.tar.gz</a>
|
|
||||||
(144k)</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<h3>Packages</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://packages.debian.org/stable/editors/bvi.html">Debian</a>
|
|
||||||
<h3>Executables</h3>
|
|
||||||
<ul>
|
|
||||||
<li>Linux: <a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.1-linux_static_elf.tar.gz">bvi-1.3.1-linux_static_elf.tar.gz</a>
|
|
||||||
(354k)</li>
|
|
||||||
<li>Solaris: <a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.1-solaris.tar.gz">bvi-1.3.1-solaris.tar.gz</a>
|
|
||||||
(107k)</li>
|
|
||||||
<li>SunOS 4.1.3: <a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.1-sun4.tar.gz">bvi-1.3.1-sun4.tar.gz</a>
|
|
||||||
(110k)</li>
|
|
||||||
<li>Linux: <a href="http://prdownloads.sourceforge.net/bvi/bvi-1.3.0-linux_static_elf.tar.gz">bvi-1.3.0-linux_static_elf.tar.gz</a>
|
|
||||||
(338k)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: January 18<sup>th</sup> 2004 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
195
html/edit.html
|
@ -1,195 +0,0 @@
|
||||||
<HTML><HEAD>
|
|
||||||
<TITLE>BVI: Edit Commands</TITLE>
|
|
||||||
<LINK REL=STYLESHEET TYPE="text/css" HREF="bvi.css">
|
|
||||||
</HEAD><BODY BGCOLOR="#ffffff">
|
|
||||||
<A NAME="top"></A>
|
|
||||||
|
|
||||||
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
|
||||||
<TR><TD WIDTH=99%>
|
|
||||||
<A CLASS=head HREF="overview.html">Command Overview</A>
|
|
||||||
<BR><FONT CLASS=sub>Edit Movements</FONT>
|
|
||||||
</TD><TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=116 ROWSPAN=2>
|
|
||||||
<A HREF="index.html">
|
|
||||||
<IMG SRC="gif/bvi_s.gif" ALT="BVI" WIDTH="116" HEIGHT="62" BORDER=0></A>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD VALIGN=BOTTOM>
|
|
||||||
<HR NOSHADE>
|
|
||||||
</TD></TR></TABLE>
|
|
||||||
<P>
|
|
||||||
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| Edit Cmds
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
If you would like to use the insert and delete commands, you have to
|
|
||||||
enable them with the <B>:set memmove</B> option. These commands are
|
|
||||||
locked per default, because you must not move bytes to a different
|
|
||||||
address for many types of binary files (e.g. executables, database files,
|
|
||||||
etc.). If you usually edit files where bytes can be moved, you can add
|
|
||||||
the <B>:set memmove</B> directive to your <B><TT>.bvirc</TT></B> file.
|
|
||||||
<P>
|
|
||||||
<TABLE WIDTH=100%>
|
|
||||||
<TR BGCOLOR=#CCCCCC><TH WIDTH=20%>Command</TH><TH WIDTH=40%>BVI</TH><TH WIDTH=40%>VI</TH></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Replace<BR>bytes</TD><TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> r </TH>
|
|
||||||
<TD>replace a single byte, no ESC needed</TD></TR>
|
|
||||||
<TR><TH>R</TH>
|
|
||||||
<TD>replace multiple bytes until you type ESC</TD></TR>
|
|
||||||
<TR><TH>~</TH>
|
|
||||||
<TD>toggle between uppercase and lowercase of a byte</TD></TR>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Append<BR>bytes</TD>
|
|
||||||
<TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> A </TH><TD>append bytes at end of file</TD></TR>
|
|
||||||
<TR><TH>D</TH><TD>delete bytes to end of file</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> A </TH><TD>append characters at end of line</TD></TR>
|
|
||||||
<TR><TH>D</TH><TD>delete characters to end of line</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=3>Insert<BR>bytes</TD>
|
|
||||||
<TD COLSPAN=2 BGCOLOR=#CCFFCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> i </TH>
|
|
||||||
<TD>insert byte in front of cursor position</TD></TR>
|
|
||||||
<TR><TH>a</TH>
|
|
||||||
<TD>insert byte after cursor position</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> I </TH><TD>insert byte at begin of file</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> I </TH><TD>insert characters at begin of line</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>o</TH><TD>insert new line below current line</TD></TR>
|
|
||||||
<TR><TH>O</TH><TD>insert new line above current line</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=4>Delete<BR>bytes</TD>
|
|
||||||
<TD COLSPAN=2 BGCOLOR=#CCFFCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> x </TH>
|
|
||||||
<TD>delete byte at of cursor position</TD></TR>
|
|
||||||
<TR><TH>X</TH><TD>delete byte in front of cursor position</TD></TR>
|
|
||||||
<TR><TH>d<FONT COLOR=#888888>SPACE</FONT></TH><TD>delete byte at cursor position</TD></TR>
|
|
||||||
<TR><TH>df<FONT COLOR=#FF0000>C</FONT></TH>
|
|
||||||
<TD>delete from current position to next character <FONT COLOR=#FF0000>C</FONT></TD></TR>
|
|
||||||
<TR><TH>d/<FONT COLOR=#FF0000>xyz</FONT></TH>
|
|
||||||
<TD>delete from current position to first occurance of matching pattern
|
|
||||||
<FONT COLOR=#FF0000>xyz</FONT>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TH>d?<FONT COLOR=#FF0000>xyz</FONT></TH>
|
|
||||||
<TD>delete from current position to first occurance of matching pattern
|
|
||||||
<FONT COLOR=#FF0000>xyz</FONT> in reverse direction
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TH>d'<FONT COLOR=#FF0000>a</FONT></TH><TD>delete from current position to mark <FONT COLOR=#FF0000>a</FONT></TD></TR>
|
|
||||||
<TR><TH>d<FONT COLOR=#FF0000>n</FONT>G</TH><TD>delete from current position to byte with (decimal) address <FONT COLOR=#FF0000>n</FONT></TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available, because there are no lines, sentences,
|
|
||||||
paragraphs or sections in a binary file</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>dd </TH><TD>delete line</TD></TR>
|
|
||||||
<TR><TH>d)</TH><TD>delete from cursor position through first
|
|
||||||
following end of sentence</TD></TR>
|
|
||||||
<TR><TH>d}</TH><TD>delete from cursor position through first
|
|
||||||
following end of paragraph</TD></TR>
|
|
||||||
<TR><TH>d]</TH><TD>delete from cursor position through first
|
|
||||||
following end of section</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>d\<FONT COLOR=#FF0000>6a 56 ff</FONT> </TH>
|
|
||||||
<TD>delete from cursor position to first occurance of hex pattern
|
|
||||||
<FONT COLOR=#FF0000>6a 56 ff</FONT></TD></TR>
|
|
||||||
<TR><TH>d#<FONT COLOR=#FF0000>6a 56 ff</FONT> </TH>
|
|
||||||
<TD>delete from cursor position to first occurance of hex pattern
|
|
||||||
<FONT COLOR=#FF0000>6a 56 ff</FONT> in reverse direction</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>D</TH><TD ROWSPAN=2>delete from current position to EOF</TD></TR>
|
|
||||||
<TR><TH> d$ </TH></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>D</TH><TD ROWSPAN=2>delete from current position to end of line</TD></TR>
|
|
||||||
<TR><TH> d$ </TH></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=2>Undo<BR>edits</TD>
|
|
||||||
<TD COLSPAN=2 BGCOLOR=#CCFFCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> u </TH>
|
|
||||||
<TD>Undo the most recent change</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> U </TH><TD>Undo all of the changes made to the current line</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
</TABLE>
|
|
||||||
<P>
|
|
||||||
Note that most of the commands can be used with a decimal repeat count in front
|
|
||||||
of the command!
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| Edit Cmds
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<FONT SIZE=-1>
|
|
||||||
<A CLASS="btop" HREF="#top"><IMG BORDER=0 WIDTH=16 HEIGHT=7 SRC="gif/up.gif"
|
|
||||||
ALT="Back to the top">Back to the top</A>
|
|
||||||
</FONT>
|
|
||||||
<HR NOSHADE>
|
|
||||||
<I>Last update: September 30<SUP>th</SUP> 1999 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</I>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY></HTML>
|
|
215
html/german.html
|
@ -1,215 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Deutsche Beschreibung</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<font color="#ffffff" class="thl">Deutsche Beschreibung<br></font>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Deutsche Beschreibung</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Der BVI (Binary-VI) ist ein Editor für Binärfiles. Seine Kommandos sind
|
|
||||||
weitgehend an den Standard UNIX Editor VI(1) angelehnt. Der Bildschirm
|
|
||||||
ist in einen hexadezimalen und einen ASCII-Bereich geteilt. Einige zusätzliche
|
|
||||||
Kommandos wurden zugefügt, einige Kommandos adaptiert und einige Kommandos,
|
|
||||||
die bei Binärfiles keinen Sinn machen, wurden weggelassen. Für eine
|
|
||||||
Gesamtübersicht siehe Manual Page BVI(1).
|
|
||||||
|
|
||||||
<H2>Zusätzliche Kommandos</H2>
|
|
||||||
|
|
||||||
Eine wichtige Funktion für binäre Files ist das Suchen nach Hexcodes.
|
|
||||||
Dafür gibt es analog zum '/' und '?' - Kommando zusätzlich das '\' und
|
|
||||||
das '#' - Kommando.<BR>
|
|
||||||
|
|
||||||
Beispiel:<BR>
|
|
||||||
\1e f4 56 - Sucht die angegebene Bytefolge in vorwärts-Richtung<BR>
|
|
||||||
#34 5a a4 - Sucht Bytefolge rückwärts.
|
|
||||||
<P>
|
|
||||||
Die normalen Textsuchkommandos sind auch vorhanden, wobei zusätzlich ein
|
|
||||||
Return, Linefeed oder NULL im Suchstring aufscheinen darf (\n \r oder \0).
|
|
||||||
<P>
|
|
||||||
Die Kommandos w, W, b, B (nächstes oder vorhergehendes Wort) wurden insoweit
|
|
||||||
abgeändert, daß sie eher dem STRINGS(1) - Kommando entsprechen, also in
|
|
||||||
einem Binärfile Textstrings suchen. Dabei sucht W und B nach Strings, die
|
|
||||||
mit einem \0 oder \n enden, w und b sucht nach Strings, die mit einem
|
|
||||||
beliebigen, nicht druckbaren Zeichen enden. Die Stringlänge beträgt 4 Zeichen,
|
|
||||||
wobei mit ":set wordlength=x" die Stringlänge auf x Zeichen eingestellt werden
|
|
||||||
kann.
|
|
||||||
<P>
|
|
||||||
Der Bildschirm ist in einen HEX und einen ASCII-Bereich aufgeteilt, wobei
|
|
||||||
jederzeit mit der TAB - Taste von einem Bereich in den anderen gewechselt
|
|
||||||
werden kann (auch im Eingabemodus). Es kann also bei der Eingabe zwischen
|
|
||||||
normalen ASCII-Zeichen und Hex-Eingabe hin- und hergesprungen werden.
|
|
||||||
<P>
|
|
||||||
|
|
||||||
Am unteren Bildrand befindet sich eine Statusanzeige, welche die Adresse des
|
|
||||||
Bytes, auf welchem der Cursor momentan steht, anzeigt. Außerdem wird das Byte
|
|
||||||
in oktaler, hexadezimaler, dezimaler und ASCII-Repräsentation anzeigt. Die
|
|
||||||
ASCII-Anzeige kann von DOS-Style (27 entspricht ^Z) auf UNIX-Style entsprechend
|
|
||||||
Manual Page ASCII(7) umgeschaltet werden (27 entspricht SUB).
|
|
||||||
Kommando ist ":set unixstyle". Die Statusanzeige kann mit ":set noshowmode"
|
|
||||||
ausgeschaltet werden.
|
|
||||||
|
|
||||||
<H2>Regular Expressions</H2>
|
|
||||||
|
|
||||||
Für die Suchkommandos sowohl für Text als auch Hex sind Regular Expressions
|
|
||||||
zulässig, wobei es die Zeichen ^ und $ für Zeilenanfang und Zeilenende nicht
|
|
||||||
gibt. Die Kombination .* ist unzulässig, da sie sich auf jeden Fall auf das
|
|
||||||
Ende des Files beziehen würde.
|
|
||||||
|
|
||||||
<H2>Zeilen</H2>
|
|
||||||
|
|
||||||
Da es in binären Files keine Zeilen gibt (die Darstellung der einzelnen
|
|
||||||
Zeilen am Bildschirm hat keinen Bezug zum File) gibt es keinerlei
|
|
||||||
zeilenorientierte Kommandos (dd, o, O, yy). Ein Kommando
|
|
||||||
wie :s/XXX/UUU/g ändert somit das gesamte File. Zu beachten ist auch, daß
|
|
||||||
:s/XX/UUUU/ nicht die beiden X durch vier U ersetzt, sondern die beiden den
|
|
||||||
X folgenden Zeichen auch durch U überschrieben werden.
|
|
||||||
|
|
||||||
<H2>Editierkommandos</H2>
|
|
||||||
|
|
||||||
Da binäre Files häufig ausführbare Programme oder Datenbankfiles sind,
|
|
||||||
bei denen Bytes nicht einfach an eine andere Adresse verschoben werden
|
|
||||||
dürfen, sind Einfüge- und Löschkommandos (z.B. a, i, x)
|
|
||||||
deaktiviert. Mit dem Kommando <B>:set memmove</B> können sie
|
|
||||||
aktiviert werden.
|
|
||||||
<P>
|
|
||||||
Die Kommandos <B>:a</B> (append), <B>:c</B> (change) und <B>:i</B> (insert)
|
|
||||||
können benutzt werden, um ein oder mehrere Bytes in ASCII, binärer,
|
|
||||||
dezimaler, hexadezimaler oder oktaler Schreibweise einzugeben
|
|
||||||
(a, b, d, h oder o). Es
|
|
||||||
können mehrere (Bildschirm) Zeilen eingegeben werden. Das Kommando
|
|
||||||
wird beendet, sobald eine Zeile, die nur aus einem Punkt besteht,
|
|
||||||
eingegeben wird.
|
|
||||||
<P>
|
|
||||||
Beispiel:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<PRE>
|
|
||||||
:i b
|
|
||||||
1 1001 010101 1111
|
|
||||||
11111 1010 1 0 1
|
|
||||||
.
|
|
||||||
</PRE>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
Zu beachten ist, daß kein Einzelwert den maximalen Byte-Wert (255)
|
|
||||||
überschreiten darf, da sonst die Eingabe abgebrochen wird. Das
|
|
||||||
Drücken der RETURN - Taste führt zu keinem "RETURN" - Zeichen in
|
|
||||||
der Datei, im ASCII - Modus können allerdings die Sonderzeichen
|
|
||||||
\n, \r, \t und \0 benutzt werden.
|
|
||||||
|
|
||||||
<H2>Yank und Put</H2>
|
|
||||||
|
|
||||||
Auch hier gilt eine etwas geänderte Funktion. Das <B>y</B> (yank) -
|
|
||||||
Kommando ist allerdings ab Version 1.2.0 dem Vi angenähert:<BR>
|
|
||||||
<TABLE>
|
|
||||||
<TR><TD>5ySPACE</TD><TD>kopiert 5 Zeichen in den Yank-Buffer</TD></TR>
|
|
||||||
<TR><TD>o</TD><TD>überschreibt an Cursor - Position die folgenden Zeichen
|
|
||||||
mit dem Inhalt des Yank- oder Delete - Puffers</TD></TR>
|
|
||||||
<TR><TD>p</TD><TD>fügt an der Cursor - Position den Inhalt des Yank-
|
|
||||||
oder Delete - Puffers ein.</TD></TR>
|
|
||||||
<TR><TD>P</TD><TD>fügt den Inhalt des Yank- oder Delete - Puffers am Dateiendes
|
|
||||||
an.</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<P>
|
|
||||||
Das Kommando ":r filename" fügt das angegebene File nicht an der Cursor-
|
|
||||||
Position sondern am Dateiende an.
|
|
||||||
|
|
||||||
<H2>Adressen</H2>
|
|
||||||
|
|
||||||
Das Kommando nG führt nicht zur n. Zeile, sondern zum n. Byte.
|
|
||||||
Die Eingabe der Nummer wird dezimal interpretiert. Um eine Adresse
|
|
||||||
hexdezimal angeben zu können, kann g eingegeben werden. Es erscheint ein
|
|
||||||
Prompt in der Statuszeile, bei dem eine hexadezimale Eingabe erfolgen kann.
|
|
||||||
Das erste Byte hat Adresse 0.<BR>
|
|
||||||
Die Anzeige der Adressen kann mit einem Offset versehen werden
|
|
||||||
(:set offset=256), beispielsweise um für .COM Files in DOS einen Beginn
|
|
||||||
bei Adresse 100Hex anzuzeigen. Wird ein offset=1 angegeben, so ist
|
|
||||||
hat das erste Byte Adresse 1. Das G - Kommando berücksichtigt den Offset.
|
|
||||||
Im Gegensatz dazu zeigt das :f - Kommando immer die Ordnungszahl des
|
|
||||||
Bytes an, beginnend mit 1 ohne Berücksichtigung des Offsets.
|
|
||||||
|
|
||||||
<H2>Bitweise Kommandos</H2>
|
|
||||||
|
|
||||||
Um Manipulationen auf Bit-Ebene durchführen zu können, stehen
|
|
||||||
folgende Kommandos zur Verfügung:
|
|
||||||
<CENTER><TABLE>
|
|
||||||
<TR><TD><B>:rl </B><I>n</I></TD><TD>Rotiert Bits links</TD><TD ROWSPAN=4>
|
|
||||||
<I>n</I> ist eine Zahl zwischen 1 und 7</TD></TR>
|
|
||||||
<TR><TD><B>:rr </B><I>n</I></TD><TD>Rotiert Bits rechts</TD></TR>
|
|
||||||
<TR><TD><B>:sl </B><I>n</I></TD><TD>Schiebt Bits links</TD></TR>
|
|
||||||
<TR><TD><B>:sr </B><I>n</I></TD><TD>Schiebt Bits rechts</TD></TR>
|
|
||||||
<TR><TD><B>:and </B><I>i</I></TD><TD>Und Verknüpfung</TD><TD ROWSPAN=4>
|
|
||||||
<I>i</I> ist eine Zahl zwischen 0 und 255</TD></TR>
|
|
||||||
<TR><TD><B>:or </B><I>i</I></TD><TD>Oder Verknüpfung</TD></TR>
|
|
||||||
<TR><TD><B>:xor </B><I>i</I></TD><TD>Exklusiv-oder Verknüpfung</TD></TR>
|
|
||||||
<TR><TD><B>:not </B></TD><TD>Negiert Bytewert</TD></TR>
|
|
||||||
<TR><TD><B>:neg </B></TD><TD>Zweier-Komplement</TD></TR>
|
|
||||||
</TABLE></CENTER>
|
|
||||||
Wird kein Bereich angegeben, so bezieht sich die Operation auf die gesamte
|
|
||||||
Datei. Es können zwei Adressen in den üblichen Schreibweisen
|
|
||||||
angegeben werden. Normalerweise wird dezimale Eingabe erwartet, bei
|
|
||||||
führender 0 werden die Adressen Hexadezimal interpretiert.
|
|
||||||
<BR>Der Wert <B>i</B> für die logische Verknüpfung kann
|
|
||||||
dezimal, hexadezimal, oder mit führendem <I>B</I> in binärer
|
|
||||||
Schreibweise angegeben werden. Auch bei Eingabe von genau acht 0 und 1
|
|
||||||
Werten wird der Byte - Wert binär interpretiert.<BR>
|
|
||||||
Beispiel:<BR>
|
|
||||||
<BLOCKQUOTE CLASS="examp">
|
|
||||||
<B><TT>:100,500and 01A </TT><FONT COLOR="#AAAAAA">RETURN</FONT></B><BR>
|
|
||||||
<B><TT>:03FA,01000or 00001000 </TT><FONT COLOR="#AAAAAA">RETURN</FONT></B><BR>
|
|
||||||
<B><TT>:.rr 3 </TT><FONT COLOR="#AAAAAA">RETURN</FONT></B><BR>
|
|
||||||
<B><TT>:'a,$sl 1 </TT><FONT COLOR="#AAAAAA">RETURN</FONT></B><BR>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: June 1<sup>st</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,5 +0,0 @@
|
||||||
P7 332
|
|
||||||
#IMGINFO:1600x1 Indexed (91 bytes)
|
|
||||||
#END_OF_COMMENTS
|
|
||||||
80 1 255
|
|
||||||
I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%Û¶Ú¶%HII·Ú¶¶%HIIÛ¶¶¶I$IIÛ¶¶Û$I$IÛ¶Ú·$IH%Û¶Ú·$IHI·Ú¶·H%HIÛ¶¶·
|
|
BIN
html/gif/bg2.gif
Before Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 869 B |
BIN
html/gif/dot.gif
Before Width: | Height: | Size: 42 B |
BIN
html/gif/up.gif
Before Width: | Height: | Size: 50 B |
130
html/index.html
|
@ -1,130 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI - Binary VIsual editor</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
<meta name="description" content="Bvi stands for Binary VIsual editor.
|
|
||||||
Bvi is a display oriented editor for binary files.
|
|
||||||
Its command set is based on those of the vi texteditor.">
|
|
||||||
<meta name="keywords" content="bvi, editor, binary, bmore, decimal, hex,
|
|
||||||
hexadecimal, linux, octal, patch, more, unix, solaris, sunos, visual, vi">
|
|
||||||
<meta name="robots" content="INDEX,FOLLOW">
|
|
||||||
<meta name="author" content="Gerhard Buergmann">
|
|
||||||
<meta name="publisher" content="Gerhard Buergmann">
|
|
||||||
<script language="JavaScript">
|
|
||||||
<!--
|
|
||||||
if(top.frames.length!=0){top.location=location;}// -->
|
|
||||||
</script>
|
|
||||||
</head><body background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><th width="1%" valign="top"><img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
<p><a class="thl" href="quick.html">
|
|
||||||
Quick Tutorial
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="download.html">
|
|
||||||
Download
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="install.html">
|
|
||||||
Installation
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="overview.html">
|
|
||||||
Command Overview
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="bmore.html">
|
|
||||||
bmore
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="german.html">
|
|
||||||
Deutsche<br>Beschreibung
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="sitemap.html">
|
|
||||||
Sitemap
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="http://sourceforge.net/projects/bvi/">
|
|
||||||
Project Page
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
<p><a class="thl" href="http://www.guckes.net/vi/clones.php3">
|
|
||||||
VI and Clones
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<p><a class="thl" href="http://sourcepole.com/sources/reviews/hexeds.xml">
|
|
||||||
Hex-Editors
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href="http://sourceforge.net">
|
|
||||||
<img src="http://sourceforge.net/sflogo.php?group_id=16427&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</th>
|
|
||||||
<td width=1%><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width=99%>
|
|
||||||
<center>
|
|
||||||
<h1>Welcome to the<br>
|
|
||||||
<img src="gif/bvi_m.gif" alt="bvi" width="232" height="125"><br>
|
|
||||||
Homepage</h1>
|
|
||||||
<b>Here you can find all the informations about <strong>bvi</strong> you need.</B>
|
|
||||||
</center>
|
|
||||||
<hr noshade>
|
|
||||||
The <strong>bvi</strong> is a display-oriented editor for binary files, based on the <strong>vi</strong> texteditor.
|
|
||||||
If you are familiar with <strong>vi</strong>, just start the editor and begin
|
|
||||||
to edit! A <strong>bmore</strong> programm is also included in the package.
|
|
||||||
<br>
|
|
||||||
If you never heard about <strong>vi</strong>, maybe <strong>bvi</strong> is not the best
|
|
||||||
choice for you.
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<h1 align="center">Current: Version 1.3.2</h1>
|
|
||||||
|
|
||||||
You can download source and compiled versions from the
|
|
||||||
<a href="download.html">download page</a>.<br>
|
|
||||||
Check out whats <a href="new132.html">new in 1.3.2</a>!
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Newsgroup:</b> <a href="news:comp.editors">comp.editors</a>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Mailing List</b> (very low traffic):
|
|
||||||
<blockquote>
|
|
||||||
To join this list, simply send a blank email to
|
|
||||||
<a href="mailto:bvi-subscribe@yahoogroups.com">bvi-subscribe@yahoogroups.com</a>.
|
|
||||||
You will receive a subscription confirmation message.
|
|
||||||
Simply reply this message and your subscription will be complete.
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<strong>Bvi</strong> was developed by Gerhard Bürgmann and is published
|
|
||||||
under the GNU Public License. Current stable version is 1.3.2.
|
|
||||||
<strong>Bvi</strong> is running on most UNIX - like operating systems and
|
|
||||||
on MSDOS.
|
|
||||||
<p>
|
|
||||||
If you want to contact me:<br>
|
|
||||||
Gerhard Bürgmann, Vienna ( <a href="http://www.purkersdorf-online.at/">Purkersdorf</a> ) / Austria / Europe<br>
|
|
||||||
E-mail: <a href="mailto:gerhard@puon.at"> gerhard@puon.at</a><br>
|
|
||||||
Have a look at <a href="http://www.meta-chrom.com/">Meta Chrom Kennzeichenhalter</a>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: January 8<sup>th</sup> 2004 by Gerhard Bürgmann</i>
|
|
||||||
</p>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
</body></html>
|
|
|
@ -1,139 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Installation</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<font color="#ffffff" class="thl">Installation<br></font>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1"></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Installation</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following steps are necessary to get bvi running:
|
|
||||||
<h2>UNIX</h2>
|
|
||||||
The Unix version of bvi needs the curses (ncurses) library
|
|
||||||
for cursor movement.
|
|
||||||
<ol>
|
|
||||||
<li>Download the source package from the Download Page</li>
|
|
||||||
<li>Unzip the package with the command:</li>
|
|
||||||
<pre class="examp">
|
|
||||||
# gunzip -c bvi-1.3.2.src.tar.gz | tar xvf
|
|
||||||
</pre>
|
|
||||||
<li>Change to the directory <tt class="examp">bvi-1.3.2</tt> and type
|
|
||||||
<pre class="examp">
|
|
||||||
# ./configure
|
|
||||||
# make
|
|
||||||
</pre></li>
|
|
||||||
|
|
||||||
<li>Type `<tt class="examp">make install</tt>' for copying the executable files
|
|
||||||
and manual pages to the final directories.
|
|
||||||
<br>
|
|
||||||
By default, `<tt class="examp">make install</tt>' will install the package's files in
|
|
||||||
<tt class="examp">`/usr/local/bin', `/usr/local/man'</tt>, etc.
|
|
||||||
You can specify an
|
|
||||||
installation prefix other than `<tt class="examp">/usr/local</tt>' by giving
|
|
||||||
`<tt class="examp">configure</tt>' the option
|
|
||||||
`<tt class="examp">--prefix=PATH</tt>'. Use the
|
|
||||||
`<tt class="examp">--with-ncurses</tt>' option to configure to specify an
|
|
||||||
alternate search path for Ncurses outside the normal
|
|
||||||
<tt class="examp">include/lib</tt> search path.
|
|
||||||
<p>
|
|
||||||
You will find now four new commands:
|
|
||||||
<pre class="examp">
|
|
||||||
bvi The binary editor
|
|
||||||
bview The readonly version of bvi
|
|
||||||
bedit The beginners version of bvi
|
|
||||||
bmore The binary more program
|
|
||||||
</pre></li>
|
|
||||||
<li>Use `<tt class="examp">make uninstall</tt>' to remove the installed
|
|
||||||
files from your file system.<br>
|
|
||||||
You can remove the program binaries and object files from the
|
|
||||||
source code directory by typing `<tt class="examp">make clean</tt>'.
|
|
||||||
To also remove the files that `<tt class="examp">configure</tt>' created
|
|
||||||
(so you can compile the package for
|
|
||||||
a different kind of computer), type `<tt class="examp">make distclean</tt>'. </li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<h2>MSDOS</h2>
|
|
||||||
Beginning with <b>version 1.3.2</b> you may use the DJGPP environment to
|
|
||||||
compile <b>bvi</b> for working under both Win32 and DOS.
|
|
||||||
<p>
|
|
||||||
The MSDOS version (Borland C) exists for historical reasons and is not
|
|
||||||
supported anymore:
|
|
||||||
<blockquote>
|
|
||||||
<p>
|
|
||||||
You have to convert the sourcefiles from the UNIX textformat to
|
|
||||||
the MSDOS textformat first. This can be done e.g. by loading and
|
|
||||||
saving them with the MSDOS standard editor `edit'.
|
|
||||||
<p>
|
|
||||||
The MSDOS version is using the conio routines of the
|
|
||||||
Borland - C compilers for cursor movement. The <tt>doscur.h</tt>
|
|
||||||
header file substitutes the curses commands.<br>
|
|
||||||
<strong>Bvi</strong> is using the "HUGE" memory model, <strong>bmore</strong>
|
|
||||||
needs the "TINY" model to
|
|
||||||
be able to convert it to a .COM file.
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Download the source package from the Download Page</li>
|
|
||||||
<li>Unzip the package with the command:
|
|
||||||
<pre class="examp">
|
|
||||||
gunzip -c bvi-1.3.2.src.tar.gz | tar xvf
|
|
||||||
</pre></li>
|
|
||||||
<li> Load the tcconfig file (located in the <TT>bc</TT> subdirectory
|
|
||||||
for Borland - C).</li>
|
|
||||||
|
|
||||||
<li> Press F9-Make</li>
|
|
||||||
</ol>
|
|
||||||
</blockquote>
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: February 12<sup>th</sup> 2004 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,181 +0,0 @@
|
||||||
<xmp>
|
|
||||||
|
|
||||||
BMORE(1) BMORE(1)
|
|
||||||
|
|
||||||
|
|
||||||
NAME
|
|
||||||
bmore - browse through a binary file
|
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
bmore [ -acdi ] [ -n lines ] [ -w cols ] [ +linenumber ] [
|
|
||||||
+/ASCII-pattern ] [ +\Hex-pattern ] [ filename ... ]
|
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
more is a filter that displays the contents of a binary
|
|
||||||
file on the terminal, one screenful at a time. It nor-
|
|
||||||
mally pauses after each screenful, and prints --More-- at
|
|
||||||
the bottom of the screen. bmore provides a two-line over-
|
|
||||||
lap between screens for continuity. If bmore is reading
|
|
||||||
from a file rather than a pipe, the percentage of charac-
|
|
||||||
ters displayed so far is also shown.
|
|
||||||
|
|
||||||
bmore scrolls up to display one more screen line in
|
|
||||||
response to a RETURN character; it displays another
|
|
||||||
screenful in response to a SPACE character. Other com-
|
|
||||||
mands are listed below.
|
|
||||||
|
|
||||||
The screen is divided in three sections or panes: 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. Note that (as one would expect) the first
|
|
||||||
byte has the offset 0 (zero).
|
|
||||||
|
|
||||||
bmore sets the terminal to noecho mode, so that the output
|
|
||||||
can be continuous. Commands that you type do not normally
|
|
||||||
show up on your terminal, except for the / , \ and ! com-
|
|
||||||
mands.
|
|
||||||
|
|
||||||
If the standard output is not a terminal, more acts just
|
|
||||||
like cat(1V), except that a header is printed before each
|
|
||||||
file in a series.
|
|
||||||
|
|
||||||
OPTIONS
|
|
||||||
-a ASCII mode: no hex representation of the contents.
|
|
||||||
Non printable characters are displayed as a dot (.)
|
|
||||||
|
|
||||||
-c Clear before displaying. Redrawing the screen
|
|
||||||
instead of scrolling.
|
|
||||||
|
|
||||||
-d Display error messages rather than ringing the ter-
|
|
||||||
minal bell if an unrecognized command is used.
|
|
||||||
This is helpful for inexperienced users.
|
|
||||||
|
|
||||||
-i Ignore case for searching.
|
|
||||||
|
|
||||||
-n lines
|
|
||||||
Displays the indicated number of lines in each
|
|
||||||
screenful, rather than the default (the number of
|
|
||||||
lines in the terminal screen less two).
|
|
||||||
|
|
||||||
-w cols
|
|
||||||
Display number of cols in each line.
|
|
||||||
|
|
||||||
+linenumber
|
|
||||||
Start up at linenumber.
|
|
||||||
|
|
||||||
+/ASCII-pattern
|
|
||||||
Start up at the line containing the regular expres-
|
|
||||||
sion pattern. Note: unlike editors, this construct
|
|
||||||
should not end with a `/'. If it does, then the
|
|
||||||
trailing slash is taken as a character in the
|
|
||||||
search pattern.
|
|
||||||
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
|
|
||||||
Commands
|
|
||||||
The commands take effect immediately; it is not necessary
|
|
||||||
to type a carriage return. Up to the time when the com-
|
|
||||||
mand character itself is given, the user may type the line
|
|
||||||
kill character to cancel the numerical argument being
|
|
||||||
formed. In addition, the user may type the erase charac-
|
|
||||||
ter to redisplay the `--More--(xx%)' message.
|
|
||||||
|
|
||||||
In the following commands, i is a numerical argument (1 by
|
|
||||||
default).
|
|
||||||
|
|
||||||
iSPACE Display another screenful, or i more lines if i
|
|
||||||
is specified.
|
|
||||||
|
|
||||||
iRETURN Display another line, or i more lines, if speci-
|
|
||||||
fied.
|
|
||||||
|
|
||||||
i^D (CTRL-D) Display (scroll down) 11 more lines. i
|
|
||||||
is given, the scroll size is set to i.
|
|
||||||
|
|
||||||
id Same as ^D.
|
|
||||||
|
|
||||||
iz Same as SPACE, except that i, if present,
|
|
||||||
becomes the new default number of lines per
|
|
||||||
screenful.
|
|
||||||
|
|
||||||
is Skip i lines and then print a screenful.
|
|
||||||
|
|
||||||
if Skip i screenfuls and then print a screenful.
|
|
||||||
|
|
||||||
i^B (CTRL-B) Skip back i screenfuls and then print a
|
|
||||||
screenful.
|
|
||||||
|
|
||||||
b Same as ^B (CTRL-D).
|
|
||||||
|
|
||||||
q
|
|
||||||
Q Exit from more.
|
|
||||||
|
|
||||||
= Display the current line number.
|
|
||||||
|
|
||||||
v Drop into the bvi(1) editor at the current off-
|
|
||||||
set of the current file.
|
|
||||||
w Drop into the bvi(1) editor at the current off-
|
|
||||||
set of the current file. Only the portion of the
|
|
||||||
file displayed on the screen will be loaded.
|
|
||||||
|
|
||||||
h Help. Give a description of all the more com-
|
|
||||||
mands.
|
|
||||||
|
|
||||||
i/pattern Search for the ith occurrence of the regular
|
|
||||||
expression pattern. Display the screenful
|
|
||||||
starting at the file position that contains the
|
|
||||||
ith match for the regular expression ASCII-pat-
|
|
||||||
tern, or the end of a pipe, whichever comes
|
|
||||||
first. If bmore is displaying a file and there
|
|
||||||
is no such match, its position in the file
|
|
||||||
remains unchanged. Regular expressions can be
|
|
||||||
edited using erase and kill characters. Erasing
|
|
||||||
back past the first column cancels the search
|
|
||||||
command.
|
|
||||||
|
|
||||||
' Single quote. Go to the point from which the
|
|
||||||
last search started. If no search has been per-
|
|
||||||
formed in the current file, go to the beginning
|
|
||||||
of the file.
|
|
||||||
|
|
||||||
!command Invoke a shell to execute command. The charac-
|
|
||||||
ters % and !, when used within command are
|
|
||||||
replaced with the current filename and the pre-
|
|
||||||
vious shell command, respectively. If there is
|
|
||||||
no current filename, % is not expanded. Prepend
|
|
||||||
a backslash to these characters to escape expan-
|
|
||||||
sion.
|
|
||||||
|
|
||||||
i:n Skip to the ith next filename given in the com-
|
|
||||||
mand line, or to the last filename in the list
|
|
||||||
if i is out of range.
|
|
||||||
|
|
||||||
i:p Skip to the ith previous filename given in the
|
|
||||||
command line, or to the first filename if i is
|
|
||||||
out of range. If given while more is positioned
|
|
||||||
within a file, go to the beginning of the file.
|
|
||||||
If more is reading from a pipe, more simply
|
|
||||||
rings the terminal bell.
|
|
||||||
|
|
||||||
:f Display the current filename and offset number.
|
|
||||||
|
|
||||||
:q
|
|
||||||
:Q Exit from bmore (same as q or Q ).
|
|
||||||
|
|
||||||
. Dot. Repeat the previous command.
|
|
||||||
|
|
||||||
|
|
||||||
FILES
|
|
||||||
/etc/termcap terminal data base
|
|
||||||
/usr/local/share/bmore.help
|
|
||||||
help file
|
|
||||||
|
|
||||||
SEE ALSO
|
|
||||||
bvi(1), termcap(5)
|
|
||||||
|
|
||||||
3 Jan 2004
|
|
||||||
</xmp>
|
|
|
@ -1,426 +0,0 @@
|
||||||
<xmp>
|
|
||||||
BVI(1) User Commands BVI(1)
|
|
||||||
|
|
||||||
|
|
||||||
NAME
|
|
||||||
bvi, bview - visual editor for binary files
|
|
||||||
|
|
||||||
VERSION
|
|
||||||
bvi-1.3.2
|
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
bvi [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file...
|
|
||||||
bview [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file...
|
|
||||||
|
|
||||||
OPTIONS
|
|
||||||
file...
|
|
||||||
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.
|
|
||||||
|
|
||||||
-R "Readonly": The readonly flag is set for all the
|
|
||||||
files, preventing accidental overwriting with a write
|
|
||||||
command.
|
|
||||||
|
|
||||||
|
|
||||||
-b begin
|
|
||||||
causes bvi to load a file not from the start but from
|
|
||||||
offset begin.
|
|
||||||
|
|
||||||
|
|
||||||
-e end
|
|
||||||
causes bvi to load a file not till end but till
|
|
||||||
address end.
|
|
||||||
|
|
||||||
|
|
||||||
-s size
|
|
||||||
causes bvi not to load the complete file but only size
|
|
||||||
bytes.
|
|
||||||
|
|
||||||
|
|
||||||
-c cmd
|
|
||||||
cmd will be executed after the first file has
|
|
||||||
been read. If the cmd contains spaces it must be
|
|
||||||
enclosed in double quotes (this depends on the shell
|
|
||||||
that is used).
|
|
||||||
|
|
||||||
-f script
|
|
||||||
This command provides a means for collecting a series
|
|
||||||
of "ex" (colon) commands into a script file, then
|
|
||||||
using this file to edit other files. Since there is no
|
|
||||||
binary stream editor "bsed", you can use this option
|
|
||||||
to make several global changes in a binary file.
|
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
Bvi stands for "Binary VIsual editor". Bvi is a screen
|
|
||||||
oriented editor for binary files; its command set is based
|
|
||||||
on that of the vi(1) text editor. As a binary editor does
|
|
||||||
not have the concept of "lines" there are differences from
|
|
||||||
Vi commands wherever the latter are line orientate.
|
|
||||||
|
|
||||||
COMPARISON
|
|
||||||
The main differences between Vi and Bvi are:
|
|
||||||
|
|
||||||
The screen is divided in three sections or panes: 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. Note that (as one would expect) the first
|
|
||||||
byte has the offset '0' (zero).
|
|
||||||
|
|
||||||
You can toggle between the hex and ascii windows with the
|
|
||||||
tab key (TAB). Toggling between these two windows does
|
|
||||||
not change the current position (offset) within the file.
|
|
||||||
|
|
||||||
No "lines" concept: Files are treated as one long stream
|
|
||||||
of bytes. The characters "newline" and "carriage return"
|
|
||||||
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. As a consequence there are no commands in bvi
|
|
||||||
from ex or vi that are based on line numbers, eg "dd",
|
|
||||||
"yy", 'C', 'S', 'o', 'O'. This also changes the meaning
|
|
||||||
of "range" before the ":write" command to a byte offset,
|
|
||||||
ie the command ":100,200w foo" writes all *bytes* (not
|
|
||||||
lines) from offset 100 to offset 200 to the file "foo".
|
|
||||||
|
|
||||||
No "text objects": There are also no text-specific
|
|
||||||
arrangements like words, paragraphs, sentences, sections
|
|
||||||
and so on.
|
|
||||||
|
|
||||||
Extended "ruler": The bottom line of the screen shows the
|
|
||||||
current address (byte offset) and the current character in
|
|
||||||
these notations:
|
|
||||||
|
|
||||||
octal, hexadecimal, decimal and ascii.
|
|
||||||
|
|
||||||
Search patterns: All search commands understand these
|
|
||||||
special characters:
|
|
||||||
|
|
||||||
. any character
|
|
||||||
[] set of characters
|
|
||||||
* zero or more occurrences of previous char or set
|
|
||||||
|
|
||||||
But as there is no concept of lines you cannot use the
|
|
||||||
standard symbols ("anchors") for "begin-of-line" ('^') and
|
|
||||||
"end-of-line" ('$'). Searching for the start/end of lines
|
|
||||||
must be done explicitly by adding these special characters
|
|
||||||
to your search pattern using these meta sequences:
|
|
||||||
|
|
||||||
\n newline
|
|
||||||
\r return
|
|
||||||
\t tab
|
|
||||||
\0 binary zero
|
|
||||||
|
|
||||||
Additional search commands: Similar to the text search
|
|
||||||
commands there are additional hex-search functions '\' and
|
|
||||||
'#' which allow to search for any byte value. Example:
|
|
||||||
"\62 76 69" will search for the string "bvi". Spaces
|
|
||||||
between hex value are optional, so searching for
|
|
||||||
"6775636B6573" will find "guckes".
|
|
||||||
|
|
||||||
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 thus disabled by
|
|
||||||
default. You can enable this commands by typing
|
|
||||||
|
|
||||||
:set memmove
|
|
||||||
|
|
||||||
BVI Modes:
|
|
||||||
|
|
||||||
Command Mode (Normal Mode):
|
|
||||||
|
|
||||||
Input is treated as command. Note that command mode is
|
|
||||||
the default mode after startup and after escaping from
|
|
||||||
input mode. Use ESC (escape) to cancel a partial
|
|
||||||
(uncompleted) command.
|
|
||||||
|
|
||||||
Input Mode:
|
|
||||||
|
|
||||||
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 'i', 'I', 'A', 'r', or 'R'. 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. Type CTRL-C to
|
|
||||||
cancel current command abnormally.
|
|
||||||
|
|
||||||
Command line mode (Last Line Mode or : mode):
|
|
||||||
|
|
||||||
Similar to vi, this mode is entered by typing one of the
|
|
||||||
characters : / ? \ # ! The command is terminated and
|
|
||||||
executed by typing a carriage return; to cancel a
|
|
||||||
partially typed command, type ESC to cancel the current
|
|
||||||
command and return to command mode.
|
|
||||||
|
|
||||||
ENVIRONMENT
|
|
||||||
The editor recognizes the environment variable BVIINIT as
|
|
||||||
a command (or list of commands) to run when it starts
|
|
||||||
up. If this variable is undefined, the editor checks for
|
|
||||||
startup commands in the file ~/.bvirc file, which you
|
|
||||||
must own. However, if there is a .bvirc owned by you in
|
|
||||||
the current directory, the editor takes its startup
|
|
||||||
commands from this file - overriding both the file in your
|
|
||||||
home directory and the environment variable.
|
|
||||||
|
|
||||||
TERMINOLOGY
|
|
||||||
Characters names are abbreviated as follows:
|
|
||||||
Abbr. ASCII name aka
|
|
||||||
CR 010 carriage return
|
|
||||||
^A 001 control-a
|
|
||||||
^H 008 control-h
|
|
||||||
^I 009 control-i aka TAB
|
|
||||||
^U 021 control-u
|
|
||||||
^Z 026 control-z
|
|
||||||
ESC 027 escape aka ESC
|
|
||||||
DEL 127 delete
|
|
||||||
LEFT --- left arrow
|
|
||||||
RIGHT --- right arrow
|
|
||||||
DOWN --- down arrow
|
|
||||||
UP --- up arrow
|
|
||||||
|
|
||||||
COMMAND SUMMARY
|
|
||||||
See the TERMINOLOGY for a summary on key name
|
|
||||||
abbreviations used within the following description of
|
|
||||||
commands.
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
Arrow keys move the cursor on the screen within the
|
|
||||||
current window.
|
|
||||||
|
|
||||||
Sample commands:
|
|
||||||
:version show version info
|
|
||||||
<- v ^ -> arrow keys move the cursor
|
|
||||||
h j k l same as arrow keys
|
|
||||||
u undo previous change
|
|
||||||
ZZ exit bvi, saving changes
|
|
||||||
:q! quit, discarding changes
|
|
||||||
/text search for text
|
|
||||||
^U ^D scroll up or down
|
|
||||||
|
|
||||||
Counts before bvi commands:
|
|
||||||
Numbers may be typed as a prefix to some commands.
|
|
||||||
They are interpreted in one of these ways.
|
|
||||||
|
|
||||||
screen column |
|
|
||||||
byte of file G
|
|
||||||
scroll amount ^D ^U
|
|
||||||
repeat effect most of the rest
|
|
||||||
|
|
||||||
Interrupting, canceling
|
|
||||||
ESC end insert or incomplete command
|
|
||||||
DEL (delete or rubout) interrupts
|
|
||||||
|
|
||||||
File manipulation:
|
|
||||||
ZZ if file modified, write and exit;
|
|
||||||
otherwise, exit
|
|
||||||
:w write changed buffer to file
|
|
||||||
:w! write changed buffer to file, overriding
|
|
||||||
read-only ("forced" write)
|
|
||||||
:q quit when no changes have been made
|
|
||||||
:q! quit and discard all changes
|
|
||||||
:e file edit file
|
|
||||||
:e! re-read current file, discard all changes
|
|
||||||
:e # edit the alternate file
|
|
||||||
:e! # edit the alternate file, discard changes
|
|
||||||
:w file write current buffer to file
|
|
||||||
:w! file write current buffer to file overriding
|
|
||||||
read-only (this "overwrites" the file)
|
|
||||||
:sh run the command as set with option "shell",
|
|
||||||
then return
|
|
||||||
:!cmd run the command cmd from "shell", then
|
|
||||||
return
|
|
||||||
:n edit next file in the argument list
|
|
||||||
:f show current filename, modified flag,
|
|
||||||
current byte offset, and percentage of
|
|
||||||
current position within buffer
|
|
||||||
^G same as :f
|
|
||||||
|
|
||||||
Additional edit 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 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 \n,
|
|
||||||
\r, \t and \0.
|
|
||||||
|
|
||||||
:i aCR insert bytes (ASCII) at cursor position
|
|
||||||
:a bCR append bytes (Binary) at end of file
|
|
||||||
:c hCR change bytes (hexadecimal) at cursor position
|
|
||||||
|
|
||||||
Bit-level operations
|
|
||||||
:and n bitwise 'and' operation with value n
|
|
||||||
:or n bitwise 'or' operation with value n
|
|
||||||
:xor n bitwise 'xor' operation with value n
|
|
||||||
:neg two's complement
|
|
||||||
:not logical negation
|
|
||||||
:sl i shift each byte i bits to the left
|
|
||||||
:sr i shift each byte i bits to the right
|
|
||||||
:rl i rotate each byte i bits to the left
|
|
||||||
:rr i rotate each byte i bits to the right
|
|
||||||
|
|
||||||
Command mode addresses
|
|
||||||
:w foo write current buffer to a file
|
|
||||||
named "foo"
|
|
||||||
:5,10w foo copy byte 5 through 100 into as
|
|
||||||
file named foo
|
|
||||||
:.,.+20w foo copy the current byte and the next
|
|
||||||
20 bytes to foo
|
|
||||||
:^,'aw foo write all bytes from the beginning
|
|
||||||
through marker 'a'
|
|
||||||
:/pat/,$ foo search pattern pat and and copy
|
|
||||||
through end of file
|
|
||||||
|
|
||||||
Positioning within file:
|
|
||||||
^B backward screen
|
|
||||||
^F forward screen
|
|
||||||
^D scroll down half screen
|
|
||||||
^U scroll up half screen
|
|
||||||
nG go to the specified character
|
|
||||||
(end default), where n is a decimal address
|
|
||||||
/pat next line matching pat
|
|
||||||
?pat previous line matching pat
|
|
||||||
\hex jump to next occurrence of hex string hex
|
|
||||||
#hex jump to previous occurrence of hex string hex
|
|
||||||
n repeat last search command
|
|
||||||
N repeat last search command, but in opposite
|
|
||||||
direction
|
|
||||||
|
|
||||||
Adjusting the screen:
|
|
||||||
^L clear and redraw screen
|
|
||||||
zCR redraw screen with current line at top of screen
|
|
||||||
z- redraw screen with current line at bottom of
|
|
||||||
screen
|
|
||||||
z. redraw screen with current line at center of
|
|
||||||
screen
|
|
||||||
/pat/z- search for pattern pat and then move currents
|
|
||||||
line to bottom
|
|
||||||
^E scroll screen down 1 line
|
|
||||||
^Y scroll screen up 1 line
|
|
||||||
|
|
||||||
Marking and returning:
|
|
||||||
mx mark current position with lower-case letter x
|
|
||||||
Note: this command works for all lower-case
|
|
||||||
letters
|
|
||||||
'x move cursor to mark x in ASCII section
|
|
||||||
`x move cursor to mark x in HEX section
|
|
||||||
'' move cursor to previous context in ASCII section
|
|
||||||
`` move cursor to previous context in HEX section
|
|
||||||
Line positioning:
|
|
||||||
H jump to first line on screen ("top")
|
|
||||||
L jump to last line on screen ("low")
|
|
||||||
M jump to middle line on screen ("middle")
|
|
||||||
- jump onto previous line on screen
|
|
||||||
+ jump onto next line on screen
|
|
||||||
CR same as +
|
|
||||||
DOWN or j next line, same column
|
|
||||||
UP or k previous line, same column
|
|
||||||
|
|
||||||
Character positioning:
|
|
||||||
^ first byte in HEX window
|
|
||||||
$ end of screen line
|
|
||||||
l or RIGHT jump onto next byte (within current
|
|
||||||
screen line)
|
|
||||||
h or LEFT jump onto previous byte (within current
|
|
||||||
screen line)
|
|
||||||
^H same as LEFT
|
|
||||||
space same as RIGHT
|
|
||||||
fx find next occurrence of character x
|
|
||||||
Fx find previous occurrence of character x
|
|
||||||
n| jump onto nth byte/character within current
|
|
||||||
line
|
|
||||||
|
|
||||||
Strings:
|
|
||||||
(works similar to the strings(1) command)
|
|
||||||
Note: "Words" are defined as strings of "nonprinting
|
|
||||||
characters".
|
|
||||||
e jump to next end of word
|
|
||||||
w jump to next begin of word
|
|
||||||
b jump to previous begin of word
|
|
||||||
W forward to next string delimited with a
|
|
||||||
\0 or \n
|
|
||||||
B back to previous string delimited with a
|
|
||||||
nonprinting char
|
|
||||||
Corrections during insert:
|
|
||||||
^H erase last character (backspace)
|
|
||||||
erase your erase character, same as ^H (backspace)
|
|
||||||
ESC ends insertion, back to command mode
|
|
||||||
|
|
||||||
Append and replace:
|
|
||||||
A append at end of file
|
|
||||||
rx replace current bte with char 'x'
|
|
||||||
R enter replace mode; for all subsequent input,
|
|
||||||
the current byte is overwritten with the next
|
|
||||||
input character; leave replace mode with ESC.
|
|
||||||
|
|
||||||
Miscellaneous Operations:
|
|
||||||
TAB toggle between ASCII and HEX section
|
|
||||||
|
|
||||||
Yank and Put:
|
|
||||||
3ySPACE yank 3 characters
|
|
||||||
p insert contents of yank buffer
|
|
||||||
o replace text with content of yank buffer
|
|
||||||
P put back at end of file
|
|
||||||
|
|
||||||
Undo, Redo:
|
|
||||||
u undo last change
|
|
||||||
Note: Only the last change can be undone.
|
|
||||||
Therefore this commands toggles between the
|
|
||||||
last and second-t-last state of the buffer.
|
|
||||||
|
|
||||||
Setting Options:
|
|
||||||
With the :set command you can set options in bvi
|
|
||||||
|
|
||||||
Option Default Description
|
|
||||||
|
|
||||||
autowrite noaw Save current file, if modified, if you
|
|
||||||
give a :n, :r or ! command
|
|
||||||
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
|
|
||||||
offset of=0 adds an offset to the diplayed addresses
|
|
||||||
readonly noro If set, write fails unless you use ! after command
|
|
||||||
scroll sc=1/2 window
|
|
||||||
Number of lines scrolled by ^U and ^D
|
|
||||||
showmode mo Displays statusline on bottom of the screen
|
|
||||||
terse noterse Let you obtain shorter error messages
|
|
||||||
window window=screensize
|
|
||||||
Lines in window, can be reduced at slow terminals
|
|
||||||
wordlength wl=4 Length of an ASCII-string found by w, W, b or B
|
|
||||||
wrapscan ws Searches wrap around past the end of the file
|
|
||||||
unixstyle nous The representation of ascii characters below
|
|
||||||
32 is displayed in the statusline as shown
|
|
||||||
in ascii(7) if unset rather in DOS-style (^A)
|
|
||||||
|
|
||||||
|
|
||||||
AUTHOR
|
|
||||||
bvi was developed by Gerhard Buergmann, Vienna, Austria
|
|
||||||
Gerhard.Buergmann@puon.at
|
|
||||||
|
|
||||||
WWW
|
|
||||||
Bvi Homepage: http://bvi.sourceforge.net/
|
|
||||||
Vi Pages: http://www.guckes.net/vi/clones.php3
|
|
||||||
(all about Vi and its clones)
|
|
||||||
|
|
||||||
FILES
|
|
||||||
$HOME/.bvirc editor startup file
|
|
||||||
./.bvirc editor startup file
|
|
||||||
|
|
||||||
BUGS
|
|
||||||
Bvi does not update the screen when the terminal changes
|
|
||||||
its size.
|
|
||||||
|
|
||||||
SEE ALSO
|
|
||||||
vi(1), strings(1), ascii(5)
|
|
||||||
|
|
||||||
3/Jan/2004 BVI Version 1.3.2
|
|
||||||
</xmp>
|
|
157
html/new120.html
|
@ -1,157 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: CHANGES in bvi 1.2.0</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
<a class="ths" href="new132.html">New in 1.3.2</a><br>
|
|
||||||
<a class="ths" href="new131.html">New in 1.3.1</a><br>
|
|
||||||
<a class="ths" href="new130.html">New in 1.3.0</a><br>
|
|
||||||
<font color="#ffffff" class="ths">New in 1.2.0<br></font>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">CHANGES in bvi 1.2.0</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<ul>
|
|
||||||
<li>Configuration with GNU autoconfig
|
|
||||||
<li>New <b>:set</b> options:
|
|
||||||
<ul>
|
|
||||||
<li><b>:set columns=n</b><br>
|
|
||||||
You can set the number of columns on the screen to an
|
|
||||||
arbitrary value. This might be useful if you edit a file
|
|
||||||
with a fixed record length.<BR>
|
|
||||||
Default: max number of columns, divisible by four.<BR>
|
|
||||||
Abbreviation: <B>:set cm=n</B>
|
|
||||||
<LI><B>:set memmove</B>
|
|
||||||
enables the new commands to insert or delete bytes.<BR>
|
|
||||||
Per default this commands are disabled, because e.g. in
|
|
||||||
executable files you must not move bytes.<BR>
|
|
||||||
Default: <B>:set nomemmove</B><BR>
|
|
||||||
Abbreviation: <B>:set mm</B> - <B>:set nomm</B>
|
|
||||||
<LI>The listing for <B>:set all</B> is now in
|
|
||||||
alphabetical order.
|
|
||||||
</UL>
|
|
||||||
<LI>New insert and delete commands:
|
|
||||||
<UL>
|
|
||||||
<LI><B>a</B> inserts after cursor position
|
|
||||||
<LI><B>i</B> inserts on cursor position
|
|
||||||
<LI><B>x</B> deletes byte under cursor
|
|
||||||
<LI><B>X</B> deletes byte before cursor
|
|
||||||
<LI><B>d</B> delete command with modifiers:
|
|
||||||
<UL>
|
|
||||||
<LI><B>d<FONT COLOR=#888888>SPACE</FONT></B> deletes byte under cursor
|
|
||||||
<LI><B>df<FONT COLOR=#FF0000>C</FONT></B> deletes from current position to
|
|
||||||
next character <FONT COLOR=#FF0000>C</FONT>
|
|
||||||
<LI><B>d/<FONT COLOR=#FF0000>xyz</FONT></B> deletes from current position
|
|
||||||
to first matching pattern <FONT COLOR=#FF0000>xyz</FONT>
|
|
||||||
<LI><B>d$</B> deletes from current position to EOF
|
|
||||||
<LI><B>d'<FONT COLOR=#FF0000>a</FONT></B> deletes from current positions
|
|
||||||
to mark <FONT COLOR=#FF0000>a</FONT>
|
|
||||||
<LI><B>d<FONT COLOR=#FF0000>n</FONT>G</B> deletes from current position to
|
|
||||||
byte with (decimal) address <FONT COLOR=#FF0000>n</FONT>
|
|
||||||
</UL>
|
|
||||||
</UL>
|
|
||||||
<LI>New syntax for <B>p</B> (put) command:<BR>
|
|
||||||
In previous versions of <I>bvi</I> the <B>p</B> command did an overwriting
|
|
||||||
"put". Now the bytes are inserted.
|
|
||||||
<LI>New command <B>o</B> (overwrite):<BR>
|
|
||||||
This is an overwriting "put" command. It is the only command in <I>bvi</I>
|
|
||||||
that uses a command key in a complete different way than in <I>vi</I>
|
|
||||||
(<B>o</B> opens a new line in <I>vi</I>).
|
|
||||||
<LI>New syntax for <B>y</B> (yank) command:
|
|
||||||
<UL>
|
|
||||||
<LI><B>y<FONT COLOR=#888888>SPACE</FONT></B> yanks byte under cursor
|
|
||||||
<LI><B>yf<FONT COLOR=#FF0000>C</FONT></B> yanks from current position to next
|
|
||||||
character <FONT COLOR=#FF0000>C</FONT>
|
|
||||||
<LI><B>y/<FONT COLOR=#FF0000>xyz</FONT></B> yanks from current position to
|
|
||||||
first matching pattern <FONT COLOR=#FF0000>xyz</FONT>
|
|
||||||
<LI><B>y$</B> yanks from current position to EOF
|
|
||||||
<LI><B>y'<FONT COLOR=#FF0000>a</FONT></B> yanks from current position to
|
|
||||||
mark <FONT COLOR=#FF0000>a</FONT>
|
|
||||||
<LI><B>y<FONT COLOR=#FF0000>n</FONT>G</B> yanks from current position to
|
|
||||||
byte with (decimal) address <FONT COLOR=#FF0000>n</FONT>
|
|
||||||
</UL>
|
|
||||||
<LI>New ex (colon) commands:
|
|
||||||
<UL>
|
|
||||||
<LI><B>:a(ppend) a(scii)|b(binary)|d(ecimal)|h(exadecimal)|o(ctal)</B>
|
|
||||||
<LI><B>:c(hange) a(scii)|b(binary)|d(ecimal)|h(exadecimal)|o(ctal)</B>
|
|
||||||
<LI><B>:i(nsert) a(scii)|b(binary)|d(ecimal)|h(exadecimal)|o(ctal)</B><BR>
|
|
||||||
The three commands above are used to append or change or insert bytes
|
|
||||||
in the selected representation until you type a line containing only
|
|
||||||
a dot, e.g. insert bytes in binary mode:
|
|
||||||
<PRE>
|
|
||||||
:i b
|
|
||||||
0 010 110 1110010 10 100
|
|
||||||
1 1001 1001 0 0
|
|
||||||
.
|
|
||||||
</PRE>
|
|
||||||
Pressing the <FONT COLOR=#888888>RETURN</FONT> key does <I>not</I> insert
|
|
||||||
a newline - character into the file. If you use <B>:i a</B> (insert
|
|
||||||
ascii) you can use the special characters \n, \r, \t and \0.
|
|
||||||
<LI><B>:d(elete)</B>
|
|
||||||
<LI><B>:g(lobal)</B> does a global search with printing found items
|
|
||||||
<LI><B>:ma(rk)</B>
|
|
||||||
<LI><B>:pu(t)</B> puts yanked bytes into the file
|
|
||||||
<LI><B>:o(verwrite)</B> is an overwriting ":put"
|
|
||||||
<LI><B>:y(ank)</B>
|
|
||||||
</UL>
|
|
||||||
<LI><B>:f newname</B> - bug fixed
|
|
||||||
<LI>new command line option <B><TT>-f script</TT></B>
|
|
||||||
<LI><B>CTRL - C</B> aborts some commands, e.g. search commands
|
|
||||||
<LI>CR moves cursor to 1st column of next screen line
|
|
||||||
<LI>Local settings according to the environment variable LANG
|
|
||||||
will be evaluated (see setlocal(3)).
|
|
||||||
</UL>
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: June, 1<sup>st</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
104
html/new130.html
|
@ -1,104 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: CHANGES in bvi 1.3.0</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
<a class="ths" href="new132.html">New in 1.3.2</a><br>
|
|
||||||
<a class="ths" href="new131.html">New in 1.3.1</a><br>
|
|
||||||
<font color="#ffffff" class="ths">New in 1.3.0<br></font>
|
|
||||||
<a class="ths" href="new120.html">New in 1.2.0</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">CHANGES in bvi 1.3.0</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<UL>
|
|
||||||
<LI>In the <FONT FACE="COURIER">configure</FONT> script you can use <FONT FACE="COURIER">--with-ncurses</FONT>
|
|
||||||
option to configure to specify an alternate
|
|
||||||
search path for Ncurses outside the normal include/lib search path.
|
|
||||||
<P>
|
|
||||||
<li>A <FONT FACE="COURIER">make uninstall</font> option has been added
|
|
||||||
<p>
|
|
||||||
<LI>A <STRONG>bmore</STRONG> program has been added. It acts like the BSD - text - more,
|
|
||||||
but for binary files.<P>
|
|
||||||
Additional command line options:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<TT><B>-a</B></TT> ASCII mode
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
Additional (changed) Commands:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<TT><B>v</B></TT> does not invoke vi but bvi<BR>
|
|
||||||
<TT><B>w</B></TT> invokes bvi with only that portion of the file
|
|
||||||
which is displayed on the screen.
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<LI>New in <STRONG>bvi</STRONG>:
|
|
||||||
<UL>
|
|
||||||
<LI>You can edit now Block Special Files too.
|
|
||||||
<LI>You can read - edit - write files partly.
|
|
||||||
<LI>New Command line options:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<TT><B>+cmd</B></TT><BR>
|
|
||||||
<TT><B>-b</B> begin \</TT><BR>
|
|
||||||
<TT><B>-e</B> end > </TT>for partial file read<BR>
|
|
||||||
<TT><B>-s</B> size /</TT><P>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<I>begin, end</I> or <I>size</I> can be an integer value (decimal or
|
|
||||||
hexadecimal) or an integer value with an appended <B>k</B> (for
|
|
||||||
multiply by 1024) or <B>m</B> (for multiply by 1.048.576).
|
|
||||||
<LI>:e# bug fixed
|
|
||||||
<li>Debian bug #68436 (Buffer overflow in io.c) fixed
|
|
||||||
</UL>
|
|
||||||
</UL>
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: October 12<sup>th</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,98 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: CHANGES in bvi 1.3.1</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
<a class="ths" href="new132.html">New in 1.3.2</a><br>
|
|
||||||
<font color="#ffffff" class="ths">New in 1.3.1<br></font>
|
|
||||||
<a class="ths" href="new130.html">New in 1.3.0</a><br>
|
|
||||||
<a class="ths" href="new120.html">New in 1.2.0</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">CHANGES in bvi 1.3.1</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This is a bugfix release.
|
|
||||||
<p>
|
|
||||||
<b><font color="red">BVI:</font></b>
|
|
||||||
<ul>
|
|
||||||
<li> autoconf 2.52 used
|
|
||||||
<p>
|
|
||||||
<li> do_back() fixed (cast)</li>
|
|
||||||
<p>
|
|
||||||
<li> replace sys_errlist[errno] with strerror(errno) (Debian #106762)</li>
|
|
||||||
<p>
|
|
||||||
<li> fix: one can continue deleting bytes even when file is empty (Debian #121934)</li>
|
|
||||||
<p>
|
|
||||||
<li> wish: no ":set mm" to delete bytes from end of file (Debian #122240)</li>
|
|
||||||
<p>
|
|
||||||
<li> cast for alloc_buf() in set.c</li>
|
|
||||||
<p>
|
|
||||||
<li> r-bug fix in edit.c and bvi.c</li>
|
|
||||||
<p>
|
|
||||||
<li> renamed CTRL to BVICTRL (AIX problem)</li>
|
|
||||||
<p>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<b><font color="red">BMORE:</font></b></li>
|
|
||||||
<ul>
|
|
||||||
<li>nicer last line</li>
|
|
||||||
<p>
|
|
||||||
<li>bmbeep() instead of beep() (SOLARIS problem)</li>
|
|
||||||
<p>
|
|
||||||
<li>subshell support fixes</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: February 12<sup>th</sup> 2002 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,93 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: CHANGES in bvi 1.3.2</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
<font color="#ffffff" class="ths">New in 1.3.2<br></font>
|
|
||||||
<a class="ths" href="new131.html">New in 1.3.1</a><br>
|
|
||||||
<a class="ths" href="new130.html">New in 1.3.0</a><br>
|
|
||||||
<a class="ths" href="new120.html">New in 1.2.0</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">CHANGES in bvi 1.3.2</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This is a bugfix release.
|
|
||||||
<p>
|
|
||||||
<b><font color="red">BVI:</font></b>
|
|
||||||
<ul>
|
|
||||||
<li> ported to compile under DJGPP v2.0 w/ PDCURSES (by simoN)</li>
|
|
||||||
<p>
|
|
||||||
<li>some minor fixes</li>
|
|
||||||
<p>
|
|
||||||
</ul>
|
|
||||||
<p><br></p>
|
|
||||||
<b><font color="red">BMORE:</font></b></li>
|
|
||||||
<ul>
|
|
||||||
<li>configure: checking term.h and ncurses/term.h</li>
|
|
||||||
<p>
|
|
||||||
<li>cast in bmore.c in putline();</li>
|
|
||||||
<p>
|
|
||||||
<li>fixed multiple file handling for "bmore" (by simoN)</li>
|
|
||||||
<p>
|
|
||||||
<li>renamed several local screen processing routines to avoid compiler conflicts</li>
|
|
||||||
<p>
|
|
||||||
<li>several minor fixes to "bmore" code (by simoN)</li>
|
|
||||||
<p>
|
|
||||||
<li>reset tty after CTRL-C in bmore</li>
|
|
||||||
</ul>
|
|
||||||
<p><br></p>
|
|
||||||
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: January 8<sup>th</sup> 2004 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,97 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Command Overview</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<font color="#ffffff" class="thl">Command Overview<br></font>
|
|
||||||
<a class="ths" href="cursor.html">Cursor Movement</a><br>
|
|
||||||
<a class="ths" href="edit.html">Edit Cmds</a><br>
|
|
||||||
<a class="ths" href="yank.html">Yank and Put Cmds</a><br>
|
|
||||||
<a class="ths" href="set.html">Set Options</a><br>
|
|
||||||
<a class="ths" href="colon.html">Colon (ex) Cmds</a><br>
|
|
||||||
<a class="ths" href="man_bvi.html">man - Page</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Command Overview</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This overview compares bvi commands with the corresponding commands of
|
|
||||||
the standard ascii vi.
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
<TABLE WIDTH=70%>
|
|
||||||
<TR BGCOLOR="#CCCCFF"><TD>Commands shown in blue frames are commands which
|
|
||||||
are available in both bvi and vi, but with a slightly different
|
|
||||||
behavior.</TD></TR>
|
|
||||||
<TR BGCOLOR="#CCFFCC"><TD>Green frames are used for commands which are
|
|
||||||
equal in both bvi and vi.</TD></TR>
|
|
||||||
<TR BGCOLOR="#FFCCCC"><TD>Red frames are used for missing commands</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
Special keys are displayed in a gray font, e.g.
|
|
||||||
<font color="#aaaaaa"><b>RETURN</b></font>,
|
|
||||||
<font color="#aaaaaa"><b>ARROW_UP</b></font> or
|
|
||||||
<font color="#aaaaaa"><b>CTRL</b></font>.
|
|
||||||
|
|
||||||
<H3>Topics:</H3>
|
|
||||||
<P>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="cursor.html">Cursor Movements</A>
|
|
||||||
<LI><A HREF="edit.html">Edit Commands</A>
|
|
||||||
<LI><A HREF="yank.html">Yank and Put Commands</A>
|
|
||||||
<LI><A HREF="set.html">Set Options</A>
|
|
||||||
<LI><A HREF="colon.html">Colon (ex) Commands</A>
|
|
||||||
</UL>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: June 1<sup>st</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
102
html/qt_bit.html
|
@ -1,102 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Bit-wise Operations</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Bit-wise Operations<br></font>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1"></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
<br><font class="sub">Bit-wise Operations</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To perform logical operations, bvi has a set of bit-level commands.
|
|
||||||
The following commands are available:
|
|
||||||
<CENTER><TABLE>
|
|
||||||
<TR><TD><B>:rl </B><I>n</I></TD><TD>rotate left</TD><TD ROWSPAN=4>
|
|
||||||
<I>n</I> is a number from 1 through 7</TD></TR>
|
|
||||||
<TR><TD><B>:rr </B><I>n</I></TD><TD>rotate right</TD></TR>
|
|
||||||
<TR><TD><B>:sr </B><I>n</I></TD><TD>shift right</TD></TR>
|
|
||||||
<TR><TD><B>:sl </B><I>n</I></TD><TD>shift left</TD></TR>
|
|
||||||
<TR><TD><B>:and </B><I>i</I></TD><TD>and operation</TD><TD ROWSPAN=4>
|
|
||||||
<I>i</I> is a number from 0 through 255</TD></TR>
|
|
||||||
<TR><TD><B>:or </B><I>i</I></TD><TD>or operation</TD></TR>
|
|
||||||
<TR><TD><B>:xor </B><I>i</I></TD><TD>or operation</TD></TR>
|
|
||||||
<TR><TD><B>:not </B></TD><TD>negates operation</TD></TR>
|
|
||||||
<TR><TD><B>:neg </B></TD><TD>negates operation</TD></TR>
|
|
||||||
</TABLE></CENTER>
|
|
||||||
<P>
|
|
||||||
The <I>i</I> value can be entered as a decimal number (0 - 255),
|
|
||||||
a hexadecimal number with a leading zero (0 - 0ff) or a binary number,
|
|
||||||
either with a leading B (B101) or exactly eight digits long (00000101).
|
|
||||||
<P>
|
|
||||||
On default the whole file is affected, but you can use the usual
|
|
||||||
colon command address forms. In contrast to vi the addresses designate
|
|
||||||
not line numbers but byte numbers. These addresses can be enterd in
|
|
||||||
decimal or hexadecimal notation.<BR>
|
|
||||||
Examples:
|
|
||||||
<BLOCKQUOTE CLASS="examp">
|
|
||||||
<B><TT>:100,500and 01A </TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
<B><TT>:03FA,01000or 00001000 </TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
<B><TT>:.rr 3 </TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
<B><TT>:'a,$sl 1 </TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,131 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Editing Files</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Editing Files<br></font>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick tutorial</font>
|
|
||||||
<br><font class="sub">Editing Files</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Inserting or deleting bytes can be dangerous on some kind of files,
|
|
||||||
because binary files are mostly executables, database files or maybe
|
|
||||||
graphic files. So you must not shift the remaining bytes to another
|
|
||||||
address.
|
|
||||||
Therefor commands for inserting or deleting bytes are disabled by
|
|
||||||
default.
|
|
||||||
You can use the <B>r</B> command to change a single byte, or
|
|
||||||
the <B>R</B> command to replace multiple characters. You can use a
|
|
||||||
numeric prefix for both commands.
|
|
||||||
<P>
|
|
||||||
You can add characters at the end of the file using the <B>A</B> command.
|
|
||||||
If you start with an empty file, you can create a binary file from
|
|
||||||
scratch. If the cursor is in the ASCII section of the screen and you
|
|
||||||
type <B><TT>100Ax</TT><FONT COLOR=#AAAAAA>ESC</FONT></B>, you create a file
|
|
||||||
which contents 100 x'es.
|
|
||||||
<P>
|
|
||||||
The <B>D</B> command can be used to truncate a file at a certain position.
|
|
||||||
Since there are no lines in a binary file, the <B>D</B> command deletes
|
|
||||||
to end of file.
|
|
||||||
<P>
|
|
||||||
If you have to edit a binary file where it does not matter to move bytes
|
|
||||||
to a different address, you can enable the insert and delete commands by
|
|
||||||
typing <B>:set memmove</B>.
|
|
||||||
Now you are able to use the <B>i</B> command for inserting bytes, the
|
|
||||||
<B>x</B> or <B>X</B> command to delete the byte over or before the cursor
|
|
||||||
and those types of <B>d</B> commands, which does not rely on text lines
|
|
||||||
(e.g. <B>d<FONT COLOR=#AAAAAA>SPACE</FONT></B>, <B>df<TT>C</TT>, d/<TT>xyz</TT>,
|
|
||||||
d$, d'a, d<TT>n</TT>G</B>).
|
|
||||||
|
|
||||||
<P>
|
|
||||||
All edits can be undone by pressing the <B>u</B> key.
|
|
||||||
<H4>Using ex (colon) commands</H4>
|
|
||||||
The edit commands of the <B>ex</B> editor are usually not available in
|
|
||||||
standard <B>vi</B> implementations (<TT>:i[nsert], :a[ppend]</TT>
|
|
||||||
and <TT>:c[hange]</TT>). In <B><FONT COLOR=#FF0000>bvi</B></FONT>
|
|
||||||
they <I>are</I> available with extended options. There are five
|
|
||||||
modifiers <TT>a[scii], b[inary], d[ecimal], h[exadecimal]</TT> and
|
|
||||||
<TT>o[ctal]</TT> (ascii is default). Therefor you can insert, append
|
|
||||||
or change data in all five representations.
|
|
||||||
<P>
|
|
||||||
<B>Example:</B><BR>
|
|
||||||
you would like to append a file with data available in decimal
|
|
||||||
representation:
|
|
||||||
<BLOCKQUOTE><PRE CLASS=examp>
|
|
||||||
:a d
|
|
||||||
0 12 3 128 255 17 0 0 255 255
|
|
||||||
23 24 25 128 6 6 6
|
|
||||||
.
|
|
||||||
</PRE></BLOCKQUOTE>
|
|
||||||
A line with only a period (.) in it will terminate the command.
|
|
||||||
<BR>
|
|
||||||
You must not type values greater than a byte value (255 decimal, FF hex).
|
|
||||||
This causes an abandon of the command.<BR>
|
|
||||||
Pressing the <FONT COLOR=#888888>RETURN</FONT> key does <I>not</I> insert
|
|
||||||
a newline - character into the file. If you use <B>:i a</B> (insert
|
|
||||||
ascii) you can use the special characters \n, \r, \t and \0.
|
|
||||||
<P>
|
|
||||||
An additional advantage is, that all typed bytes are inserted into the
|
|
||||||
file at once. If you insert characters in vi - mode, for every byte typed,
|
|
||||||
the whole remaining file has to be moved one position backwards.
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: June 1<sup>st</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,99 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Find and Replace</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Find and Replace<br></font>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
<br><font class="sub">Find and Replace</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The <B><TT CLASS="examp">:s</TT></B> (substitute) command behaves a little bit
|
|
||||||
different to that of vi. If you type a command like this in vi <NOBR>
|
|
||||||
<B><TT CLASS="examp">:s/XXXX/UU/</TT></B></NOBR> then the four XXXX's are
|
|
||||||
replaced by
|
|
||||||
two UU's. This means, the file size decreases and all characters after
|
|
||||||
the replacement are moved to another position in the file. Since bvi
|
|
||||||
does not move characters, only two XX's are replaced by two UU's and
|
|
||||||
the third and fourth X still remains in the file.<BR>
|
|
||||||
Another example:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<B><TT CLASS="examp">:0,500s/Taste\0/Key\0/</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P>
|
|
||||||
This command replaces within the first 500 bytes of a file the 0 -
|
|
||||||
terminated ASCII string "<TT CLASS="examp">Taste</TT>"
|
|
||||||
with the 0 - terminated
|
|
||||||
string "<TT CLASS="examp">Key</TT>". After the substitution
|
|
||||||
you will find a
|
|
||||||
character sequence "<TT CLASS="examp">Key\0e\0</TT>" in the file.<BR>
|
|
||||||
CAUTION: If the replace
|
|
||||||
string is longer than the find string, additional bytes are overwritten!
|
|
||||||
<BR>
|
|
||||||
This behaviour will not be changed by setting the
|
|
||||||
<TT CLASS="examp">:set memmove</TT> option!
|
|
||||||
<P>
|
|
||||||
Of course you can do also binary substitutions, similar to the search
|
|
||||||
command. The ability of remembering patterns like <B><TT CLASS="examp">\(pattern\)</TT></B>
|
|
||||||
is currently not implemented.
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: Fri Jun 30 22:33:20 CEST 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,145 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Partial File Read</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Partial File Read<br></font>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
<br><font class="sub">Partial File Read</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
A new feature of version 1.3.0 is the Partial File Read.
|
|
||||||
If you want to edit a file, you have not to read the file into
|
|
||||||
memory but only the part you want to edit. You can write back this part
|
|
||||||
into the file after editing.
|
|
||||||
<BR>
|
|
||||||
Example:
|
|
||||||
<BR>
|
|
||||||
You have to change only some bytes of the header of a graphic file
|
|
||||||
(e.g. a color). Graphic files can be very large. With the <TT>-s</TT>
|
|
||||||
option you can load only the first kilobyte of the file:
|
|
||||||
<PRE>
|
|
||||||
bvi -s 1000 large.gif
|
|
||||||
</PRE>
|
|
||||||
In this case of course you cannot insert or delete bytes of the file.
|
|
||||||
The editor is set to the <I>no memmove</I> mode. You can write back
|
|
||||||
only as much bytes as you read before. If you add or delete bytes
|
|
||||||
even though, the extra bytes will be ignored or garbage will be
|
|
||||||
written to the file.
|
|
||||||
<P>
|
|
||||||
It is also possible to start not at the begin of the file, but at a
|
|
||||||
certain address. To do this you have to use the option <TT>-b</TT>.
|
|
||||||
You can read the file from this starting point until the end of the file
|
|
||||||
or you can use the <TT>-s</TT> option to specify a size or the
|
|
||||||
<TT>-e</TT> option to specify an end address.
|
|
||||||
<P>
|
|
||||||
If you read the file not from the start an offset will be set to
|
|
||||||
display the correct address at the left side of the screen. If you change this
|
|
||||||
offset with the <TT>:set offset=<I>nnnn</I></TT> command, this has
|
|
||||||
<B>no</B> effect to the write back operation. The edited part of the
|
|
||||||
file will always be written back at the same position, where it was read.
|
|
||||||
<P>
|
|
||||||
In the Linux <TT>/proc</TT> directory there are files which are listed
|
|
||||||
with length 0 in a directory listing. But in reality they have a content.
|
|
||||||
You can read this files, if you use the <TT>-s</TT> option and guess a
|
|
||||||
size. This size should be a little bit larger than the size you expect.
|
|
||||||
<P>
|
|
||||||
The same guidlines can be used, if you load a block device, e.g. a
|
|
||||||
floppy disk.
|
|
||||||
<PRE>
|
|
||||||
bvi -s 1450k /dev/fd0
|
|
||||||
</PRE>
|
|
||||||
After reading the device, you get a message with the value of the
|
|
||||||
real read bytes at the bottom of the screen:
|
|
||||||
<PRE>
|
|
||||||
"/dev/fd0" range 0-1474559
|
|
||||||
</PRE>
|
|
||||||
Note that the <I>size</I> value will be used to allocate memory before
|
|
||||||
reading the file. Therefore do not choose a too large size.<BR>
|
|
||||||
Note further, that <I>1450k</I> in the example above is calculated as
|
|
||||||
<I>1450 * 1024</I> bytes. This gives <I>1484800</I> bytes allocated size.
|
|
||||||
If <STRONG>bvi</STRONG> reads the exact number of bytes you have asked for
|
|
||||||
in the <TT>-s</TT> option, the file may be larger.
|
|
||||||
<P>
|
|
||||||
<B>WARNING:</B>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
Do not use <STRONG>bvi</STRONG> at mounted disk devices!<BR>
|
|
||||||
Do not edit disk devices, if you don't know exactly what you change!<BR>
|
|
||||||
You may make your disk unreadable by editing it!!
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<H3>Interaction with <STRONG>bmore</STRONG></H3>
|
|
||||||
You may use <STRONG>bmore</STRONG> to browse through large files or
|
|
||||||
devices. You may use the ASCII - or Hex - search possibilities to
|
|
||||||
locate a certain section of the file.<BR>
|
|
||||||
If you see the desired part of the file on your screen, press <I><B>w</B></I> to
|
|
||||||
read the contents of the file displayed currently on your screen into
|
|
||||||
<STRONG>bvi</STRONG>. You can use a decimal prefix at the <I><B>w</B></I> -
|
|
||||||
command to read more or less bytes than displayed into <STRONG>bvi</STRONG>.
|
|
||||||
<BR>
|
|
||||||
The letter <I><B>w</B></I> is the next letter after <I><B>v</B></I>, which
|
|
||||||
is used in more and bmore to read the whole file into vi or bvi!
|
|
||||||
<P>
|
|
||||||
If you used the <TT>ZZ</TT> or <TT>:w</TT> command, this part of the file will be
|
|
||||||
written back into the original file.
|
|
||||||
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: Sun Jul 09 21:57:38 CEST 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,116 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Search Commands</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Search Commands<br></font>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
<br><font class="sub">Search Commands</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Additional to the well known <B>/</B> and <B>?</B> for searching ASCII
|
|
||||||
strings there are two new commands for searching binary strings. These
|
|
||||||
are the keys <B>\</B> and <B>#</B>.
|
|
||||||
<P>
|
|
||||||
In the ASCII search commands <B>/</B> and <B>?</B> you can use \n, \r,
|
|
||||||
\t and \0. You can also use regular expressions. Do <I>not</I> use
|
|
||||||
<B>^</B> and <B>$</B>, because there are no lines in a binary file.
|
|
||||||
Type <B><TT>/foo\0</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B> to
|
|
||||||
search for the null terminated string <I>foo</I> in the file.
|
|
||||||
<P>
|
|
||||||
In the Hex section you can search for a sequence of bytes in hexadecimal
|
|
||||||
notation, e.g. <NOBR><B><TT>\01 AF 12</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B>,
|
|
||||||
</NOBR> which is the same as <NOBR><B><TT>\01AF12</TT><FONT COLOR=#AAAAAA>
|
|
||||||
RETURN</FONT></B></NOBR>.
|
|
||||||
You can also use regular expressions and quoted ASCII strings. Inside of
|
|
||||||
the quotes no character is treated as a special character!<BR>
|
|
||||||
Example:
|
|
||||||
<B><TT>\01 [^AF DE] "foo" 00 </TT><FONT COLOR=#AAAAAA>RETURN</FONT></B>
|
|
||||||
<BR>
|
|
||||||
This means: Search for a string beginning with 01, the second character
|
|
||||||
must not be a hex <TT>AF</TT> or <TT>DE</TT>, followed by the ASCII
|
|
||||||
characters <TT>foo</TT>, terminated with a binary zero.
|
|
||||||
|
|
||||||
<H3>Global Search</H3>
|
|
||||||
There is also a global search option available, but only with the
|
|
||||||
print option.<BR>
|
|
||||||
Example:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<B><TT>:g/text_pattern/p</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B>
|
|
||||||
<BR>or<BR>
|
|
||||||
<B><TT>:g\hex_pattern\p</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
This commands are displaying all found patterns, one per screen line.
|
|
||||||
Of course you can limit the search to a certain part of the file by
|
|
||||||
specifying the starting and ending address.<BR>
|
|
||||||
Other forms of the global search command
|
|
||||||
are line oriented, therefor <B>not</B> useful for binary files and
|
|
||||||
<B>not implemented</B>, e.g.<BR>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<TABLE>
|
|
||||||
<TR><TD>:g/pattern/d</TD><TD>Delete all lines containing <I>pattern</I></TD></TR>
|
|
||||||
<TR><TD>:g/pattern/y</TD><TD>Yank all lines containing <I>pattern</I></TD></TR>
|
|
||||||
<TR><TD>:g!/pattern/p</TD><TD>Print all lines <B>not</B> containing <I>pattern</I></TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
127
html/qt_set.html
|
@ -1,127 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Settings</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Settings<br></font>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
<br><font class="sub">Settings</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To customize bvi some additional <B>:set</B> options are
|
|
||||||
available. You can add them to your <B><TT CLASS="examp">.bvirc</TT></B>
|
|
||||||
file, if you need them all the time.
|
|
||||||
|
|
||||||
<H4>columns</H4>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
You can set the number of columns on the screen to an arbitrary value.
|
|
||||||
This might be useful if you edit a file with a fixed record length.<BR>
|
|
||||||
Default value is the max. number of columns, divisible by four.<BR>
|
|
||||||
Example: <B><TT>:set columns=13<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B><BR>
|
|
||||||
Abbreviation: <B><TT>:set cm=9<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
|
|
||||||
<H4>memmove</H4>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
This option enables the commands for inserting and deleting bytes.
|
|
||||||
<BR>
|
|
||||||
Default: <B><TT>:set nomemmove<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B><BR>
|
|
||||||
Abbreviation: <B><TT>:set mm<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
|
|
||||||
<H4>offset</H4>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
You can change the beginning of the displayed byte numbering to a
|
|
||||||
certain number. The default address of the first byte is 0. You can
|
|
||||||
change it to 1 or to any other number by typing:<BR>
|
|
||||||
<B><TT>:set offset=1</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
You can also use a hexadecimal address, if you type a leading zero:<BR>
|
|
||||||
<B><TT>:set of=01FF</TT><FONT COLOR=#AAAAAA>RETURN</FONT></B><BR>
|
|
||||||
The only commands which are not affected by these numbering is
|
|
||||||
<TT><B>:f</B></TT> or <TT><B><FONT COLOR=#AAAAAA>CTRL</FONT>
|
|
||||||
-G</B></TT>. These commands always
|
|
||||||
designates the first byte in file as 1.
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
|
|
||||||
<H4>unixstyle</H4>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
The rightmost character in the status line displays the ASCII value of
|
|
||||||
the current byte. For values below 32 you can use the notation used on
|
|
||||||
the ascii(7) man page (like NUL, SOH, STX etc.) if you do a<BR>
|
|
||||||
<B><TT>:set unixstyle<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B> or a<BR>
|
|
||||||
<B><TT>:set us<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B>. If you do a<BR>
|
|
||||||
<B><TT>:set nous<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B> you get a
|
|
||||||
DOS style representation (^A, ^B, ^C etc.).
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
|
|
||||||
<H4>wordlength</H4>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
This setting is used to define the minimum length of a "word".
|
|
||||||
A "word" is a sequence of ASCII characters within a binary
|
|
||||||
file. The commands <B>w, b, e, W, B</B> and <B>E</B> are affected by
|
|
||||||
this setting.
|
|
||||||
<P>
|
|
||||||
Default: <B><TT>:set wordlength=4<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B><BR>
|
|
||||||
Abbreviation: <B><TT>:set wl=4<FONT COLOR=#AAAAAA>RETURN</FONT></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,133 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Yank and Put</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<font color="#ffffff" class="ths">Yank and Put<br></font>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
<br><font class="sub">Yank and Put</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Starting with version 1.2.0 there is a new syntax for the yank and put
|
|
||||||
commands! Yank is now more similare to vi.
|
|
||||||
<P>
|
|
||||||
<TABLE>
|
|
||||||
<TR><TD><B>y<FONT COLOR=#888888>SPACE</FONT></B></TD>
|
|
||||||
<TD>yanks byte under cursor</TD></TR>
|
|
||||||
<TR><TD><B><FONT COLOR=#FF0000>n</FONT>y<FONT COLOR=#888888>SPACE</FONT></B>
|
|
||||||
</TD>
|
|
||||||
<TD>yanks <FONT COLOR=#FF0000>n</FONT> bytes, beginning at cursor
|
|
||||||
position</TD></TR>
|
|
||||||
<TR><TD><B>yf<FONT COLOR=#FF0000>C</FONT></B></TD>
|
|
||||||
<TD>yanks from current position to next
|
|
||||||
character <FONT COLOR=#FF0000>C</FONT></TD></TR>
|
|
||||||
<TR><TD><B>y/<FONT COLOR=#FF0000>xyz</FONT></B></TD>
|
|
||||||
<TD>yanks from current position to first matching
|
|
||||||
pattern <FONT COLOR=#FF0000>xyz</FONT></TD></TR>
|
|
||||||
<TR><TD><B>y$</B></TD><TD>yanks from current position to EOF</TD></TR>
|
|
||||||
<TR><TD><B>y'<FONT COLOR=#FF0000>a</FONT></B></TD>
|
|
||||||
<TD>yanks from current position to mark <FONT COLOR=#FF0000>a</FONT></TD></TR>
|
|
||||||
<TR><TD><B>y<FONT COLOR=#FF0000>n</FONT>G</B></TD>
|
|
||||||
<TD>yanks from current position to byte with (decimal)
|
|
||||||
address <FONT COLOR=#FF0000>n</FONT></TD></TR>
|
|
||||||
<TR><TD><B><TT>o</B></TT></TD>
|
|
||||||
<TD>overwrites the bytes after the cursor with the contents of the yank
|
|
||||||
or delete buffer</TD></TR>
|
|
||||||
<TR><TD><B><TT>p</B></TT></TD><TD>puts the contents of the yank or delete
|
|
||||||
buffer after the cursor</TD></TR>
|
|
||||||
<TR><TD><B><TT>P</B></TT></TD><TD>appends the contents of the buffer to end
|
|
||||||
of file</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
<H3>Using ex (colon) Commands</H3>
|
|
||||||
<B>:y</B>(ank)
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<I>yank</I> can be used with one or two addresses specified. One address
|
|
||||||
with no <I>count</I> specified copies the specified byte into the buffer.
|
|
||||||
Two addresses with no <I>count</I> specified copies multiple bytes
|
|
||||||
starting and ending with the specified bytes. Two addresses and a <I>count</I>
|
|
||||||
value copies <I>count</I> bytes starting at the second specified address (the
|
|
||||||
first address is ignored). If no address is specified, the current address
|
|
||||||
ist used by <I>yank</I>.<BR>
|
|
||||||
Examples:
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
:<I>start_addr,end_addr</I> y <FONT COLOR=#888888>RETURN</FONT><BR>
|
|
||||||
:<I>start_addr</I> y <I>byte_count</I><FONT COLOR=#888888>RETURN</FONT><BR>
|
|
||||||
:y <I>byte_count</I><FONT COLOR=#888888>RETURN</FONT><BR>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P>
|
|
||||||
<B>:pu</B>(t)
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
Restores previously deleted or yanked bytes after the address specified
|
|
||||||
in the <I>put</I> command.
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P>
|
|
||||||
<B>:o</B>(verwrite)
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
Overwrites bytes after the specified address with previously deleted or yanked
|
|
||||||
bytes.
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P>
|
|
||||||
NOTE: There are currently no namend buffers available.
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: June 1<sup>st</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
200
html/quick.html
|
@ -1,200 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Quick Tutorial</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<font color="#ffffff" class="thl">Quick Tutorial<br></font>
|
|
||||||
<a class="ths" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
<a class="ths" href="qt_search.html">Search Commands</a><br>
|
|
||||||
<a class="ths" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
<a class="ths" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
<a class="ths" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
<a class="ths" href="qt_set.html">Settings</a><br>
|
|
||||||
<a class="ths" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Quick Tutorial</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This tutorial will explain all commands which behaves different to
|
|
||||||
vi. Note that, if you are on a Linux system, you will probably
|
|
||||||
have an 'improved' version of vi. Bvi is more similar to the standard
|
|
||||||
version.
|
|
||||||
|
|
||||||
<H3>The Screen</H3>
|
|
||||||
<CENTER>
|
|
||||||
<TABLE WIDTH=10 CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
|
||||||
<TR><TD BGCOLOR=#ffccff><PRE CLASS="examp">
|
|
||||||
000000
|
|
||||||
00000C
|
|
||||||
000018
|
|
||||||
000024
|
|
||||||
000030
|
|
||||||
00003C
|
|
||||||
000048
|
|
||||||
000054
|
|
||||||
000060
|
|
||||||
00006C
|
|
||||||
000078
|
|
||||||
000084
|
|
||||||
000090
|
|
||||||
00009C</PRE></TD><TD BGCOLOR=#ccffcc><PRE CLASS="examp">
|
|
||||||
7F <tt class="inv">4</tt>5 4C 46 01 01
|
|
||||||
00 00 00 00 01 00
|
|
||||||
00 00 00 00 00 00
|
|
||||||
00 00 00 00 34 00
|
|
||||||
0C 00 09 00 00 00
|
|
||||||
00 00 00 00 55 89
|
|
||||||
53 C7 45 A4 00 00
|
|
||||||
00 00 00 83 7D 08
|
|
||||||
8C 02 00 00 E9 6F
|
|
||||||
00 00 00 00 6A 03
|
|
||||||
45 08 50 E8 FC FF
|
|
||||||
0C 85 D2 75 17 6A
|
|
||||||
E9 43 02 00 00 8D
|
|
||||||
0C 85 D2 75 0D C7</PRE></TD><TD BGCOLOR=#ccffcc><PRE CLASS="examp">
|
|
||||||
01 00 00 00 00 00
|
|
||||||
03 00 01 00 00 00
|
|
||||||
00 00 0C 07 00 00
|
|
||||||
00 00 00 00 28 00
|
|
||||||
00 00 00 00 00 00
|
|
||||||
E5 83 EC 68 57 56
|
|
||||||
00 00 C7 45 A0 01
|
|
||||||
00 75 13 6A 00 E8
|
|
||||||
02 00 00 8D B4 26
|
|
||||||
68 90 00 00 00 8B
|
|
||||||
FF FF 89 C2 83 C4
|
|
||||||
01 E8 60 02 00 00
|
|
||||||
74 26 00 8D BC 27
|
|
||||||
45 A0 00 00 00 00</PRE></TD><TD BGCOLOR=#FFCCCC><PRE CLASS="examp">
|
|
||||||
.ELF........
|
|
||||||
............
|
|
||||||
............
|
|
||||||
....4.....(.
|
|
||||||
............
|
|
||||||
....U....hWV
|
|
||||||
S.E......E..
|
|
||||||
....}..u.j..
|
|
||||||
.....o.....&
|
|
||||||
....j.h.....
|
|
||||||
E.P.........
|
|
||||||
...u.j..`...
|
|
||||||
.C....t&...'
|
|
||||||
...u..E.....</PRE></TD></TR>
|
|
||||||
<TR BGCOLOR=#FFFFCC><TD COLSPAN=2 CLASS="examp">"set.o" 3500 bytes</TD>
|
|
||||||
<TD COLSPAN=2 ALIGN=RIGHT CLASS="examp"><B>000001 \105 0x45 69 'E'</B></TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
The screen is divided into four areas, symbolized by four different
|
|
||||||
colors. The magenta area contents the addresses in hexadecimal
|
|
||||||
notation. The green area contents the values of the edited file in
|
|
||||||
hexadecimal notation. The red area contents the same bytes in ASCII
|
|
||||||
representation. The yellow status line displays on the left side the
|
|
||||||
current status messages and on the right site the current position
|
|
||||||
of the cursor and the value of the byte on this address in octal,
|
|
||||||
hexadecimal, decimal and ASCII notation.
|
|
||||||
<BR>
|
|
||||||
You can toggle between the Hex and ASCII value of the same byte by
|
|
||||||
pressing the <FONT COLOR=#AAAAAA><B>TAB</B></FONT> key both in command
|
|
||||||
and input mode.
|
|
||||||
|
|
||||||
<H3>Command Line Options</H3>
|
|
||||||
There are some additional command line options in <B>bvi</B>:<BR>
|
|
||||||
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<B><TT>-f <I>script</I></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
This command provides a means for collecting a series of <I>ex</I>
|
|
||||||
(colon) commands into a script file, then using this file to edit
|
|
||||||
other files. Since there is no binary stream editor <I>bsed</I>, you
|
|
||||||
can use this option to make several global changes in a binary file.
|
|
||||||
You can do this of course with the <i>source</I> command (<B>:so file</B>)
|
|
||||||
from within bvi too.
|
|
||||||
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<B><TT>-b <I>begin</I></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
This option causes bvi to load a file not from start but from address
|
|
||||||
<I>begin</I>.
|
|
||||||
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<B><TT>-e <I>end</I></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
This option causes bvi to load a file not till end but till address
|
|
||||||
<I>end</I>.
|
|
||||||
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<B><TT>-s <I>size</I></TT></B>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
This option causes bvi not to load the complete file but only <I>size</I>
|
|
||||||
bytes. This option can also be used to read a file reported with a
|
|
||||||
length 0 like some files in the Linux <TT CLASS="examp">/proc</TT>
|
|
||||||
directory.
|
|
||||||
<P>
|
|
||||||
<I>begin, end</I> or <I>size</I> can be an integer value (decimal or
|
|
||||||
hexadecimal) or an integer value with an appended <B>k</B> (for
|
|
||||||
multiply by 1024) or <B>m</B> (for multiply by 1.048.576).
|
|
||||||
<P>
|
|
||||||
You should use at most two of the three address options to avoid ambiguity!
|
|
||||||
|
|
||||||
|
|
||||||
<H3>Not Implemented Commands</H3>
|
|
||||||
<P>
|
|
||||||
<UL>
|
|
||||||
<LI><B><TT>:map</TT></B> and <B><TT>:unmap</TT></B> (Macros)
|
|
||||||
<LI><B><TT>:abbreviate</TT></B> (<B><TT>:ab</TT></B>) and <B><TT>:una</TT></B>
|
|
||||||
<LI>no named buffers.
|
|
||||||
</UL>
|
|
||||||
<p><font size="-1">
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</font>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: October 19<sup>th</sup> 2000 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<HTML><HEAD>
|
|
||||||
<TITLE>Source RPM</TITLE>
|
|
||||||
<META HTTP-EQUIV="refresh" CONTENT="0; URL=http://sites.inka.de/~mips/unix/index.html">
|
|
||||||
</HEAD><BODY BGCOLOR=#ffffff>
|
|
||||||
Switching to <A HREF="http://sites.inka.de/mips/unix/index.html">http://sites.inka.de/mips/unix/index.html</A> . . .
|
|
||||||
</BODY></HTML>
|
|
117
html/set.html
|
@ -1,117 +0,0 @@
|
||||||
<HTML><HEAD>
|
|
||||||
<TITLE>BVI: Set Commands</TITLE>
|
|
||||||
<LINK REL=STYLESHEET TYPE="text/css" HREF="bvi.css">
|
|
||||||
</HEAD><BODY BGCOLOR="#ffffff">
|
|
||||||
<A NAME="top"></A>
|
|
||||||
|
|
||||||
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
|
||||||
<TR><TD WIDTH=99%>
|
|
||||||
<A CLASS=head HREF="overview.html">Command Overview</A>
|
|
||||||
<BR><FONT CLASS=sub>Set Commands</FONT>
|
|
||||||
</TD><TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=116 ROWSPAN=2>
|
|
||||||
<A HREF="index.html">
|
|
||||||
<IMG SRC="gif/bvi_s.gif" ALT="BVI" WIDTH="116" HEIGHT="62" BORDER=0></A>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD VALIGN=BOTTOM>
|
|
||||||
<HR NOSHADE>
|
|
||||||
</TD></TR></TABLE>
|
|
||||||
<P>
|
|
||||||
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| Set Options
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<TABLE WIDTH=100%>
|
|
||||||
<TR BGCOLOR=#CCCCCC><TH WIDTH=20%>Command</TH><TH WIDTH=40%>BVI</TH><TH WIDTH=40%>VI</TH></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Search<BR>settings</TD><TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:set wrapscan</B> or <B>:set ws</B><BR>
|
|
||||||
<B>:set nows</B></TD>
|
|
||||||
<TD>When this option is set, pattern searches resulting from a <B>/,
|
|
||||||
?, n, N</B> (<B>#, \</B>) command automatically wrap around to the opposit end of the file
|
|
||||||
and continue whenever the beginning or end of a file is reached.</TD></TR>
|
|
||||||
<TR><TD><B>:set ignorecase</B> or <B>:set ic</B><BR>
|
|
||||||
<B>:set noic</B></TD>
|
|
||||||
<TD>Uppercase and lowercase characters in text are treated identically
|
|
||||||
in regular expression matching</TD></TR>
|
|
||||||
<TR><TD><B>:set magic</B><BR>
|
|
||||||
<B>:set nomagic</B></TD>
|
|
||||||
<TD>Enables metacharacters for use in regular expressions</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>Display<BR>options</TD><TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:set showmode</B><BR>
|
|
||||||
<B>:set noshowmode</B></TD>
|
|
||||||
<TD>Displays a status message in the lowest line on the screen</TD></TR>
|
|
||||||
<TR><TD><B>:set terse</B><BR>
|
|
||||||
<B>:set noterse</B></TD>
|
|
||||||
<TD>The terse option lets you obtain shorter error diagnostics.</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>File<BR>options</TD><TD BGCOLOR=#CCFFCC COLSPAN=2>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:set readonly</B> or <B> :set ro</B><BR>
|
|
||||||
<B>:set noro</B></TD>
|
|
||||||
<TD>This option sets the read-only flag for the file being editeds,
|
|
||||||
thus preventing accidental overwriting at the end of the session.</TD></TR>
|
|
||||||
<TR><TD><B>:set autowrite</B> or <B>:set aw</B><BR>
|
|
||||||
<B>:set noaw</B></TD>
|
|
||||||
<TD>Causes the contents of the buffer to be written to the current file
|
|
||||||
if you have modified them and given a <B>:next, :rewind</B> or <B>!</B>
|
|
||||||
command.</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER>bvi<BR>options</TD>
|
|
||||||
<TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD><B>:set columns=13<BR>:set cm=5</B></TD>
|
|
||||||
<TD>You can set the number of bytes displayed in on screenline.
|
|
||||||
Default is max. number divisible by four.</TD></TR>
|
|
||||||
<TR><TD><B>:set memmove<BR>:set nomm</B></TD>
|
|
||||||
<TD>If memmove is set, you can use commands to insert or delete bytes.
|
|
||||||
This can be dangerous for e.g. executable programs.
|
|
||||||
Default is nomemmove.</TD></TR>
|
|
||||||
<TR><TD><B>:set offset=1<BR>:set of=5</B></TD>
|
|
||||||
<TD>An offset is added to all addresses and byte counts. Default
|
|
||||||
address of the first byte is 0.</TD></TR>
|
|
||||||
<TR><TD><B>:set wordlength=5<BR>:set wl=8</B></TD>
|
|
||||||
<TD>Length of an ASCII-string found by <B>w, W, b</B> or <B>B</B></TD></TR>
|
|
||||||
<TR><TD><B>:set unixstyle<BR>:set nous</B></TD>
|
|
||||||
<TD>displays ASCII characters below 32 in the status line in
|
|
||||||
Unix-style instead of DOS-style</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFCCCC>
|
|
||||||
Not available.
|
|
||||||
</TD></TR>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| <A CLASS="thl" HREF="yank.html">Yank and Put Cmds</A>
|
|
||||||
| Set Options
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<FONT SIZE=-1>
|
|
||||||
<A CLASS="btop" HREF="#top"><IMG BORDER=0 WIDTH=16 HEIGHT=7 SRC="gif/up.gif"
|
|
||||||
ALT="Back to the top">Back to the top</A>
|
|
||||||
</FONT>
|
|
||||||
<HR NOSHADE>
|
|
||||||
<I>Last update: October 30<SUP>th</SUP> 1999 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</I>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY></HTML>
|
|
|
@ -1,160 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
|
||||||
<html><head>
|
|
||||||
<title>BVI: Sitemap</title>
|
|
||||||
<link rel=stylesheet type="text/css" href="bvi.css">
|
|
||||||
</head><body bgcolor="#ffffff" background="gif/bg2.gif">
|
|
||||||
<a name="top"></a>
|
|
||||||
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td width="1%" valign="top" align="center">
|
|
||||||
<img src="gif/dot.gif" width="130" height="1" alt="">
|
|
||||||
|
|
||||||
<hr noshade width="60%">
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</p>
|
|
||||||
<hr noshade width="60%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td width="1%"><img src="gif/dot.gif" width="40" height="1" alt=""></td>
|
|
||||||
<td width="99%">
|
|
||||||
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tr><td width="99%">
|
|
||||||
<font class="head">Sitemap</font>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="bottom" width="116" rowspan="2">
|
|
||||||
<a href="index.html">
|
|
||||||
<img src="gif/bvi_s.gif" alt="BVI" width="116"
|
|
||||||
height="62" border="0"></a>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td valign="bottom">
|
|
||||||
<hr noshade>
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="index.html">Home</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
</ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="quick.html">Quick Tutorial</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_edit.html">Editing Files</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_search.html">Search Commands</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_bit.html">Bit-wise Operations</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_find.html">Find and Replace</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_yank.html">Yank and Put</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_set.html">Settings</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="qt_partial.html">Partial File Read</a><br>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="download.html">Download</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="new132.html">New in 1.3.2</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="new131.html">New in 1.3.1</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="new130.html">New in 1.3.0</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="new120.html">New in 1.2.0</a><br>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="install.html">Installation</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
</ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="overview.html">Command Overview</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="cursor.html">Cursor Movement</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="edit.html">Edit Cmds</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="yank.html">Yank and Put Cmds</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="set.html">Set Options</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="colon.html">Colon (ex) Cmds</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="man_bvi.html">man - Page</a><br>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="bmore.html">bmore</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="bmore_cmd.html">Commands</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="bmore_opt.html">Options</a><br>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="man_bmore.html">man - Page</a><br>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<li>
|
|
||||||
<a class="thl" href="german.html">Deutsche Beschreibung</a><br>
|
|
||||||
</li>
|
|
||||||
<ul>
|
|
||||||
</ul>
|
|
||||||
</ul><p>
|
|
||||||
<p><small>
|
|
||||||
<a class="btop" href="#top">
|
|
||||||
<img border="0" width="16" height="7" src="gif/up.gif"
|
|
||||||
alt="Back to the top">Back to the top</a>
|
|
||||||
</small>
|
|
||||||
<hr noshade>
|
|
||||||
<i>Last update: January 8<sup>th</sup> 2004 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</i>
|
|
||||||
</td></tr></table>
|
|
||||||
</body></html>
|
|
142
html/yank.html
|
@ -1,142 +0,0 @@
|
||||||
<HTML><HEAD>
|
|
||||||
<TITLE>BVI: Yank and Put Commands</TITLE>
|
|
||||||
<LINK REL=STYLESHEET TYPE="text/css" HREF="bvi.css">
|
|
||||||
</HEAD><BODY BGCOLOR="#ffffff">
|
|
||||||
<A NAME="top"></A>
|
|
||||||
|
|
||||||
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
|
||||||
<TR><TD WIDTH=99%>
|
|
||||||
<A CLASS=head HREF="overview.html">Command Overview</A>
|
|
||||||
<BR><FONT CLASS=sub>Yank and Put Commands</FONT>
|
|
||||||
</TD><TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=116 ROWSPAN=2>
|
|
||||||
<A HREF="index.html">
|
|
||||||
<IMG SRC="gif/bvi_s.gif" ALT="BVI" WIDTH="116" HEIGHT="62" BORDER=0></A>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD VALIGN=BOTTOM>
|
|
||||||
<HR NOSHADE>
|
|
||||||
</TD></TR></TABLE>
|
|
||||||
<P>
|
|
||||||
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| Yank and Put Cmds
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
NOTE: the <B>o</B> command (<I>overwriting put</I>) is the only command in
|
|
||||||
bvi that uses a key for a complete different purpose than in vi.
|
|
||||||
<P>
|
|
||||||
<TABLE WIDTH=100%>
|
|
||||||
<TR BGCOLOR=#CCCCCC><TH WIDTH=20%>Command</TH><TH WIDTH=40%>BVI</TH><TH WIDTH=40%>VI</TH></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=3>Put<BR>bytes</TD>
|
|
||||||
<TD COLSPAN=2 BGCOLOR=#CCFFCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> p </TH>
|
|
||||||
<TD>put the contents of the yank or delete buffer after cursor position</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> P </TH><TD>append the contents of the yank or delete buffer at EOF</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> P </TH><TD>put the contents of the yank or delete buffer
|
|
||||||
before cursor position</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> o </TH><TD>overwrite the following bytes with the contents
|
|
||||||
of the yank or delete buffer</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#CCCCCC ALIGN=CENTER ROWSPAN=4>Yank<BR>bytes</TD>
|
|
||||||
<TD COLSPAN=2 BGCOLOR=#CCFFCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>y<FONT COLOR=#888888>SPACE</FONT></TH><TD>yank byte at cursor position</TD></TR>
|
|
||||||
<TR><TH>yf<FONT COLOR=#FF0000>C</FONT></TH>
|
|
||||||
<TD>yank from current position to next character <FONT COLOR=#FF0000>C</FONT></TD></TR>
|
|
||||||
<TR><TH>y/<FONT COLOR=#FF0000>xyz</FONT></TH>
|
|
||||||
<TD>yank from current position to matching pattern <FONT COLOR=#FF0000>xyz</FONT>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TH>y?<FONT COLOR=#FF0000>xyz</FONT></TH>
|
|
||||||
<TD>yank from current position to matching pattern <FONT COLOR=#FF0000>xyz</FONT> in reverse direction
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TH>y'<FONT COLOR=#FF0000>a</FONT></TH><TD>yank from current position to mark <FONT COLOR=#FF0000>a</FONT></TD></TR>
|
|
||||||
<TR><TH>y<FONT COLOR=#FF0000>n</FONT>G</TH><TD>yank from current position to byte with (decimal) address <FONT COLOR=#FF0000>n</FONT></TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
|
|
||||||
<TR><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>yy </TH><TD>yank line</TD></TR>
|
|
||||||
<TR><TH>y)</TH><TD>yank from cursor position through first
|
|
||||||
following end of sentence</TD></TR>
|
|
||||||
<TR><TH>y}</TH><TD>yank from cursor position through first
|
|
||||||
following end of paragraph</TD></TR>
|
|
||||||
<TR><TH>y]</TH><TD>yank from cursor position through first
|
|
||||||
following end of section</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#FFFFFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH>y\<FONT COLOR=#FF0000>6a 56 ff</FONT> </TH>
|
|
||||||
<TD>yank from cursor position to first occurance of hex pattern
|
|
||||||
<FONT COLOR=#FF0000>6a 56 ff</FONT></TD></TR>
|
|
||||||
<TR><TH>y#<FONT COLOR=#FF0000>6a 56 ff</FONT> </TH>
|
|
||||||
<TD>yank from cursor position to first occurance of hex pattern
|
|
||||||
<FONT COLOR=#FF0000>6a 56 ff</FONT> in reverse direction</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#FFCCCC>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TD ROWSPAN=2>not available</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
<TR><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> y$ </TH><TD>yank from current position to EOF</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD><TD BGCOLOR=#CCCCFF>
|
|
||||||
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
|
||||||
<TR><TH> y$ </TH><TD>yank from current position to end of line</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
</TD></TR>
|
|
||||||
</TABLE>
|
|
||||||
<P>
|
|
||||||
Note that most of the commands can be used with a decimal repeat count in front
|
|
||||||
of the command!
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<CENTER>
|
|
||||||
[ <A CLASS="thl" HREF="cursor.html">Cursor Movements</A>
|
|
||||||
| <A CLASS="thl" HREF="edit.html">Edit Cmds</A>
|
|
||||||
| Yank and Put Cmds
|
|
||||||
| <A CLASS="thl" HREF="set.html">Set Options</A>
|
|
||||||
| <A CLASS="thl" HREF="colon.html">Colon (ex) Cmds</A>
|
|
||||||
]
|
|
||||||
</CENTER>
|
|
||||||
<P>
|
|
||||||
<FONT SIZE=-1>
|
|
||||||
<A CLASS="btop" HREF="#top"><IMG BORDER=0 WIDTH=16 HEIGHT=7 SRC="gif/up.gif"
|
|
||||||
ALT="Back to the top">Back to the top</A>
|
|
||||||
</FONT>
|
|
||||||
<HR NOSHADE>
|
|
||||||
<I>Last update: October 30<SUP>th</SUP> 1999 by Gerhard Bürgmann,
|
|
||||||
<a class="btop" href="http://www.purkersdorf-online.at/">Purkersdorf</a>/Austria</I>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY></HTML>
|
|
107
io.c
|
@ -8,10 +8,12 @@
|
||||||
* 2000-03-23 V 1.3.0 beta
|
* 2000-03-23 V 1.3.0 beta
|
||||||
* 2000-08-17 V 1.3.0 final
|
* 2000-08-17 V 1.3.0 final
|
||||||
* 2004-01-04 V 1.3.2
|
* 2004-01-04 V 1.3.2
|
||||||
|
* 2010-06-02 V 1.3.4
|
||||||
|
* 2014-05-03 V 1.4.0
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2004 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -30,11 +32,20 @@
|
||||||
#include "bvi.h"
|
#include "bvi.h"
|
||||||
#include "set.h"
|
#include "set.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#if 0
|
||||||
#ifndef SIZE_T_MAX
|
/* nowadays (2009) we should make sure that bvi is compiled with LFS support: */
|
||||||
# define SIZE_T_MAX ULONG_MAX
|
/* defines _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 */
|
||||||
|
/* if compiled without LFS support, stat() open() lseek() will fail with */
|
||||||
|
/* EOVERFLOW(75) Value too large for defined data type */
|
||||||
|
/* see README for configure arguments to enable lfs support in 32-bit executables */
|
||||||
|
/* cygwin enables lfs by default */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
# ifndef OFF_T_MAX
|
||||||
|
# define OFF_T_MAX ULONG_LONG_MAX
|
||||||
|
# endif
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -58,7 +69,7 @@ save(fname, start, end, flags)
|
||||||
int flags;
|
int flags;
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
char string[255];
|
char *string;
|
||||||
char *newstr;
|
char *newstr;
|
||||||
off_t filesize;
|
off_t filesize;
|
||||||
|
|
||||||
|
@ -66,16 +77,23 @@ save(fname, start, end, flags)
|
||||||
emsg("No file|No current filename");
|
emsg("No file|No current filename");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
string = malloc((size_t)strlen(fname) + MAXCMD);
|
||||||
|
if (string == NULL) {
|
||||||
|
emsg("Out of memory");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (stat(fname, &buf) == -1) {
|
if (stat(fname, &buf) == -1) {
|
||||||
newstr = "[New file] ";
|
newstr = "[New file] ";
|
||||||
} else {
|
} else {
|
||||||
if (S_ISDIR(buf.st_mode)) {
|
if (S_ISDIR(buf.st_mode)) {
|
||||||
sprintf(string, "\"%s\" Is a directory", fname);
|
sprintf(string, "\"%s\" Is a directory", fname);
|
||||||
msg(string);
|
msg(string);
|
||||||
|
free(string);
|
||||||
return 0;
|
return 0;
|
||||||
} else if (S_ISCHR(buf.st_mode)) {
|
} else if (S_ISCHR(buf.st_mode)) {
|
||||||
sprintf(string, "\"%s\" Character special file", fname);
|
sprintf(string, "\"%s\" Character special file", fname);
|
||||||
msg(string);
|
msg(string);
|
||||||
|
free(string);
|
||||||
return 0;
|
return 0;
|
||||||
} else if (S_ISBLK(buf.st_mode)) {
|
} else if (S_ISBLK(buf.st_mode)) {
|
||||||
/*
|
/*
|
||||||
|
@ -90,36 +108,42 @@ save(fname, start, end, flags)
|
||||||
if (filemode == PARTIAL) flags = O_RDWR;
|
if (filemode == PARTIAL) flags = O_RDWR;
|
||||||
if ((fd = open(fname, flags, 0666)) < 0) {
|
if ((fd = open(fname, flags, 0666)) < 0) {
|
||||||
sysemsg(fname);
|
sysemsg(fname);
|
||||||
|
free(string);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (filemode == PARTIAL) {
|
if (filemode == PARTIAL) {
|
||||||
if (block_read) {
|
if (block_read) {
|
||||||
filesize = block_read;
|
filesize = block_read;
|
||||||
sprintf(string, "\"%s\" range %lu-%lu", fname,
|
sprintf(string, "\"%s\" range %llu-%llu", fname,
|
||||||
(unsigned long)block_begin,
|
(unsigned long long)block_begin,
|
||||||
(unsigned long)(block_begin - 1 + filesize));
|
(unsigned long long)(block_begin - 1 + filesize));
|
||||||
if (lseek(fd, block_begin, SEEK_SET) < 0) {
|
if (lseek(fd, block_begin, SEEK_SET) < 0) {
|
||||||
sysemsg(fname);
|
sysemsg(fname);
|
||||||
|
free(string);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
msg("Null range");
|
msg("Null range");
|
||||||
|
free(string);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
filesize = end - start + 1L;
|
filesize = end - start + 1L;
|
||||||
sprintf(string, "\"%s\" %s%lu bytes", fname, newstr,
|
|
||||||
(unsigned long)filesize);
|
sprintf(string, "\"%s\" %s%llu bytes", fname, newstr,
|
||||||
|
(unsigned long long)filesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (write(fd, start, filesize) != filesize) {
|
if (write(fd, start, filesize) != filesize) {
|
||||||
sysemsg(fname);
|
sysemsg(fname);
|
||||||
|
free(string);
|
||||||
close(fd);
|
close(fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
edits = 0;
|
edits = 0;
|
||||||
msg(string);
|
msg(string);
|
||||||
|
free(string);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,17 +154,31 @@ load(fname)
|
||||||
char *fname;
|
char *fname;
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
char string[MAXCMD];
|
char *string;
|
||||||
|
|
||||||
buf.st_size = 0L;
|
buf.st_size = 0L;
|
||||||
if (fname != NULL) {
|
if (fname != NULL) {
|
||||||
|
/*
|
||||||
sprintf(string, "\"%s\"", fname);
|
sprintf(string, "\"%s\"", fname);
|
||||||
msg(string);
|
msg(string);
|
||||||
refresh();
|
refresh();
|
||||||
|
*/
|
||||||
if (stat(fname, &buf) == -1) {
|
if (stat(fname, &buf) == -1) {
|
||||||
filemode = NEW;
|
/* check for EOVERFLOW 75 */
|
||||||
|
/* Value too large for defined data type */
|
||||||
|
/* means bvi is compiled without lfs support */
|
||||||
|
if (errno == ENOENT) {
|
||||||
|
filemode = NEW;
|
||||||
|
} else {
|
||||||
|
move(maxy, 0);
|
||||||
|
endwin();
|
||||||
|
perror(fname);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
/*
|
||||||
} else if (S_ISDIR(buf.st_mode)) {
|
} else if (S_ISDIR(buf.st_mode)) {
|
||||||
filemode = DIRECTORY;
|
filemode = DIRECTORY;
|
||||||
|
*/
|
||||||
} else if (S_ISCHR(buf.st_mode)) {
|
} else if (S_ISCHR(buf.st_mode)) {
|
||||||
filemode = CHARACTER_SPECIAL;
|
filemode = CHARACTER_SPECIAL;
|
||||||
} else if (S_ISBLK(buf.st_mode)) {
|
} else if (S_ISBLK(buf.st_mode)) {
|
||||||
|
@ -158,15 +196,23 @@ load(fname)
|
||||||
sysemsg(fname);
|
sysemsg(fname);
|
||||||
filemode = ERROR;
|
filemode = ERROR;
|
||||||
}
|
}
|
||||||
} else if (S_ISREG(buf.st_mode)) {
|
} else if (S_ISREG(buf.st_mode) || S_ISDIR(buf.st_mode)) {
|
||||||
if ((unsigned long)buf.st_size > (unsigned long)SIZE_T_MAX) {
|
#if 0
|
||||||
|
/* stat() call above will fail if file is too large */
|
||||||
|
/* this size check will never fail */
|
||||||
|
if ((unsigned long long)buf.st_size > (unsigned long long)OFF_T_MAX) {
|
||||||
move(maxy, 0);
|
move(maxy, 0);
|
||||||
endwin();
|
endwin();
|
||||||
printf("File too large\n");
|
printf("File too large\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ((fd = open(fname, O_RDONLY)) > 0) {
|
if ((fd = open(fname, O_RDONLY)) > 0) {
|
||||||
filemode = REGULAR;
|
if (S_ISREG(buf.st_mode)) {
|
||||||
|
filemode = REGULAR;
|
||||||
|
} else {
|
||||||
|
filemode = DIRECTORY;
|
||||||
|
}
|
||||||
if (access(fname, W_OK)) {
|
if (access(fname, W_OK)) {
|
||||||
P(P_RO) = TRUE;
|
P(P_RO) = TRUE;
|
||||||
params[P_RO].flags |= P_CHANGED;
|
params[P_RO].flags |= P_CHANGED;
|
||||||
|
@ -182,6 +228,9 @@ load(fname)
|
||||||
if (mem != NULL) free(mem);
|
if (mem != NULL) free(mem);
|
||||||
memsize = 1024;
|
memsize = 1024;
|
||||||
if (block_flag) {
|
if (block_flag) {
|
||||||
|
if (block_flag == BLOCK_BEGIN) {
|
||||||
|
block_size = buf.st_size - block_begin;
|
||||||
|
}
|
||||||
memsize += block_size;
|
memsize += block_size;
|
||||||
} else if (filemode == REGULAR) {
|
} else if (filemode == REGULAR) {
|
||||||
memsize += buf.st_size;
|
memsize += buf.st_size;
|
||||||
|
@ -194,6 +243,15 @@ load(fname)
|
||||||
}
|
}
|
||||||
clear_marks();
|
clear_marks();
|
||||||
|
|
||||||
|
if (fname != NULL) {
|
||||||
|
string = malloc((size_t)strlen(fname) + MAXCMD);
|
||||||
|
} else {
|
||||||
|
string = malloc(MAXCMD);
|
||||||
|
}
|
||||||
|
if (string == NULL) {
|
||||||
|
emsg("Out of memory");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (block_flag && ((filemode == REGULAR) || (filemode == BLOCK_SPECIAL))) {
|
if (block_flag && ((filemode == REGULAR) || (filemode == BLOCK_SPECIAL))) {
|
||||||
if (lseek(fd, block_begin, SEEK_SET) < 0) {
|
if (lseek(fd, block_begin, SEEK_SET) < 0) {
|
||||||
|
@ -204,9 +262,9 @@ load(fname)
|
||||||
sprintf(string, "\"%s\" Empty file", fname);
|
sprintf(string, "\"%s\" Empty file", fname);
|
||||||
filemode = ERROR;
|
filemode = ERROR;
|
||||||
} else {
|
} else {
|
||||||
sprintf(string, "\"%s\" range %lu-%lu", fname,
|
sprintf(string, "\"%s\" range %llu-%llu", fname,
|
||||||
(unsigned long)block_begin,
|
(unsigned long long)block_begin,
|
||||||
(unsigned long)(block_begin + filesize - 1));
|
(unsigned long long)(block_begin + filesize - 1));
|
||||||
filemode = PARTIAL;
|
filemode = PARTIAL;
|
||||||
block_read = filesize;
|
block_read = filesize;
|
||||||
P(P_OF) = block_begin;
|
P(P_OF) = block_begin;
|
||||||
|
@ -215,7 +273,7 @@ load(fname)
|
||||||
msg(string);
|
msg(string);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
} else if (filemode == REGULAR) {
|
} else if ((filemode == REGULAR) || (filemode == DIRECTORY)) {
|
||||||
filesize = buf.st_size;
|
filesize = buf.st_size;
|
||||||
if (read(fd, mem, filesize) != filesize) {
|
if (read(fd, mem, filesize) != filesize) {
|
||||||
sysemsg(fname);
|
sysemsg(fname);
|
||||||
|
@ -231,9 +289,9 @@ load(fname)
|
||||||
sprintf(string, "\"%s\" [New File]", fname);
|
sprintf(string, "\"%s\" [New File]", fname);
|
||||||
break;
|
break;
|
||||||
case REGULAR:
|
case REGULAR:
|
||||||
sprintf(string, "\"%s\" %s%lu bytes", fname,
|
sprintf(string, "\"%s\" %s%llu bytes", fname,
|
||||||
P(P_RO) ? "[Read only] " : "",
|
P(P_RO) ? "[Read only] " : "",
|
||||||
(unsigned long)filesize);
|
(unsigned long long)filesize);
|
||||||
break;
|
break;
|
||||||
case DIRECTORY:
|
case DIRECTORY:
|
||||||
sprintf(string, "\"%s\" Directory", fname);
|
sprintf(string, "\"%s\" Directory", fname);
|
||||||
|
@ -252,6 +310,7 @@ load(fname)
|
||||||
loc = HEX;
|
loc = HEX;
|
||||||
x = AnzAdd; y = 0;
|
x = AnzAdd; y = 0;
|
||||||
repaint();
|
repaint();
|
||||||
|
free(string);
|
||||||
return(filesize);
|
return(filesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,12 +395,14 @@ enlarge(add)
|
||||||
void
|
void
|
||||||
do_shell()
|
do_shell()
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
addch('\n');
|
addch('\n');
|
||||||
savetty();
|
savetty();
|
||||||
#ifdef DJGPP
|
#ifdef DJGPP
|
||||||
system("");
|
ret = system("");
|
||||||
#else
|
#else
|
||||||
system(shell);
|
ret = system(shell);
|
||||||
#endif
|
#endif
|
||||||
resetty();
|
resetty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define VERSION "1.3.2"
|
#define VERSION "1.4.0"
|
||||||
|
|
60
re.c
|
@ -8,8 +8,10 @@
|
||||||
* 1999-09-10 V 1.2.0
|
* 1999-09-10 V 1.2.0
|
||||||
* 2000-04-25 V 1.3.0 beta
|
* 2000-04-25 V 1.3.0 beta
|
||||||
* 2000-09-29 V 1.3.0 final
|
* 2000-09-29 V 1.3.0 final
|
||||||
|
* 2010-06-02 V 1.3.4
|
||||||
|
* 2013-08-24 V 1.4.0
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2013 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -43,7 +45,7 @@ char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot ma
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
PTR
|
||||||
bregexec(start, scan)
|
bregexec(start, scan)
|
||||||
PTR start;
|
PTR start;
|
||||||
char *scan;
|
char *scan;
|
||||||
|
@ -59,10 +61,12 @@ bregexec(start, scan)
|
||||||
if (P(P_IC) && smode == ASCII) test = toupper(*start);
|
if (P(P_IC) && smode == ASCII) test = toupper(*start);
|
||||||
else test = *start;
|
else test = *start;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
if (test != *scan) return 0;
|
/* if (test != *scan) return 0; */
|
||||||
|
if (test != *scan) return NULL;
|
||||||
scan++;
|
scan++;
|
||||||
} else if (count > 1) {
|
} else if (count > 1) {
|
||||||
if (sbracket(test, scan, count)) return 0;
|
/* if (sbracket(test, scan, count)) return 0; */
|
||||||
|
if (sbracket(test, scan, count)) return NULL;
|
||||||
scan += count;
|
scan += count;
|
||||||
}
|
}
|
||||||
*act++ = *start++;
|
*act++ = *start++;
|
||||||
|
@ -83,9 +87,11 @@ bregexec(start, scan)
|
||||||
while (start < maxpos) {
|
while (start < maxpos) {
|
||||||
if (bregexec(start, scan + count)) {
|
if (bregexec(start, scan + count)) {
|
||||||
*act = '\0';
|
*act = '\0';
|
||||||
return 1;
|
/* return 1; */
|
||||||
|
return start;
|
||||||
}
|
}
|
||||||
if (sbracket(test, scan, count)) return 0;
|
/* if (sbracket(test, scan, count)) return 0; */
|
||||||
|
if (sbracket(test, scan, count)) return NULL;
|
||||||
*act++ = *start++;
|
*act++ = *start++;
|
||||||
if (P(P_IC) && smode == ASCII) test = toupper(*start);
|
if (P(P_IC) && smode == ASCII) test = toupper(*start);
|
||||||
else test = *start;
|
else test = *start;
|
||||||
|
@ -100,14 +106,19 @@ bregexec(start, scan)
|
||||||
}
|
}
|
||||||
} else { /* ".*" */
|
} else { /* ".*" */
|
||||||
while (start < maxpos) {
|
while (start < maxpos) {
|
||||||
if (bregexec(start, scan)) { *act = '\0'; return 1; }
|
/* if (bregexec(start, scan)) { *act = '\0'; return 1; } */
|
||||||
|
if (bregexec(start, scan)) {
|
||||||
|
*act = '\0';
|
||||||
|
return start;
|
||||||
|
}
|
||||||
start++;
|
start++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*act = '\0';
|
*act = '\0';
|
||||||
return 1; /* found */
|
return start; /* found */
|
||||||
|
/* return 1; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -487,17 +498,23 @@ patcpy(s1, s2, delim)
|
||||||
|
|
||||||
|
|
||||||
PTR
|
PTR
|
||||||
|
fsearch_end(start, end, smem, s_end)
|
||||||
|
/*
|
||||||
fsearch(start, end, smem)
|
fsearch(start, end, smem)
|
||||||
|
*/
|
||||||
PTR start;
|
PTR start;
|
||||||
PTR end;
|
PTR end;
|
||||||
char *smem;
|
char *smem;
|
||||||
|
PTR *s_end;
|
||||||
{
|
{
|
||||||
PTR spos;
|
PTR spos;
|
||||||
|
|
||||||
signal(SIGINT, jmpproc);
|
signal(SIGINT, jmpproc);
|
||||||
for (spos = start; spos <= end; spos++) {
|
for (spos = start; spos <= end; spos++) {
|
||||||
if (bregexec(spos, smem)) {
|
/* if (bregexec(spos, smem)) { */
|
||||||
|
if (*s_end = bregexec(spos, smem)) {
|
||||||
signal(SIGINT, SIG_IGN);
|
signal(SIGINT, SIG_IGN);
|
||||||
|
*s_end++;
|
||||||
return(spos);
|
return(spos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -506,6 +523,17 @@ fsearch(start, end, smem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PTR
|
||||||
|
fsearch(start, end, smem)
|
||||||
|
PTR start;
|
||||||
|
PTR end;
|
||||||
|
char *smem;
|
||||||
|
{
|
||||||
|
PTR s_end;
|
||||||
|
return fsearch_end(start, end, smem, &s_end);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PTR
|
PTR
|
||||||
rsearch(start, end, smem)
|
rsearch(start, end, smem)
|
||||||
PTR start;
|
PTR start;
|
||||||
|
@ -542,7 +570,7 @@ calc_addr(pointer, def_addr)
|
||||||
addr = def_addr;
|
addr = def_addr;
|
||||||
SKIP_WHITE
|
SKIP_WHITE
|
||||||
if (*cmd >= '1' && *cmd <= '9') {
|
if (*cmd >= '1' && *cmd <= '9') {
|
||||||
addr = mem + strtol(cmd, &cmd, 10) - P(P_OF);
|
addr = mem + strtoll(cmd, &cmd, 10) - P(P_OF);
|
||||||
} else {
|
} else {
|
||||||
ch = *cmd;
|
ch = *cmd;
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
@ -619,19 +647,11 @@ calc_addr(pointer, def_addr)
|
||||||
if (*cmd == '+') {
|
if (*cmd == '+') {
|
||||||
cmd++;
|
cmd++;
|
||||||
SKIP_WHITE
|
SKIP_WHITE
|
||||||
if (*cmd >= '1' && *cmd <= '9') {
|
addr += strtoll(cmd, &cmd, 0);
|
||||||
addr += strtol(cmd, &cmd, 10);
|
|
||||||
} else if (*cmd == '0') {
|
|
||||||
addr += strtol(cmd, &cmd, 16);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
cmd++;
|
cmd++;
|
||||||
SKIP_WHITE
|
SKIP_WHITE
|
||||||
if (*cmd >= '1' && *cmd <= '9') {
|
addr -= strtoll(cmd, &cmd, 0);
|
||||||
addr -= strtol(cmd, &cmd, 10);
|
|
||||||
} else if (*cmd == '0') {
|
|
||||||
addr -= strtol(cmd, &cmd, 16);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
SKIP_WHITE
|
SKIP_WHITE
|
||||||
}
|
}
|
||||||
|
|
4
script
|
@ -1,4 +1,8 @@
|
||||||
|
set columns=8
|
||||||
set mm
|
set mm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0,20d
|
0,20d
|
||||||
w! %.new
|
w! %.new
|
||||||
q
|
q
|
||||||
|
|
49
set.c
|
@ -11,8 +11,10 @@
|
||||||
* 2000-07-15 V 1.3.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
|
* 2003-07-03 V 1.3.2
|
||||||
|
* 2010-06-02 V 1.2.4
|
||||||
|
* 2014-09-30 V 1.4.0
|
||||||
*
|
*
|
||||||
* Copyright 1996-2003 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* gerhard@puon.at
|
* gerhard@puon.at
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
@ -33,8 +35,8 @@
|
||||||
|
|
||||||
static int from_file = 0;
|
static int from_file = 0;
|
||||||
static FILE *ffp;
|
static FILE *ffp;
|
||||||
static char fbuf[256];
|
static char fbuf[MAXCMD+1];
|
||||||
static char buf[64];
|
static char buf[MAXCMD+1];
|
||||||
|
|
||||||
struct param params[] = {
|
struct param params[] = {
|
||||||
{ "autowrite", "aw", FALSE, "", P_BOOL },
|
{ "autowrite", "aw", FALSE, "", P_BOOL },
|
||||||
|
@ -53,6 +55,7 @@ struct param params[] = {
|
||||||
{ "window", "window", 25, "", P_NUM },
|
{ "window", "window", 25, "", P_NUM },
|
||||||
{ "wordlength", "wl", 4, "", P_NUM },
|
{ "wordlength", "wl", 4, "", P_NUM },
|
||||||
{ "wrapscan", "ws", TRUE, "", P_BOOL },
|
{ "wrapscan", "ws", TRUE, "", P_BOOL },
|
||||||
|
{ "highlight", "hl", TRUE, "", P_BOOL },
|
||||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||||
{ "color", "co", 7, "", P_NUM },
|
{ "color", "co", 7, "", P_NUM },
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,8 +102,9 @@ doset(arg)
|
||||||
sprintf(buf, " %s=%s", params[i].fullname,
|
sprintf(buf, " %s=%s", params[i].fullname,
|
||||||
params[i].svalue);
|
params[i].svalue);
|
||||||
else
|
else
|
||||||
sprintf(buf, " %s=%ld", params[i].fullname,
|
|
||||||
params[i].nvalue);
|
sprintf(buf, " %s=%lld", params[i].fullname,
|
||||||
|
(long long)params[i].nvalue);
|
||||||
msg(buf);
|
msg(buf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -117,11 +121,7 @@ doset(arg)
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
s = arg + strlen(s) + 1;
|
s = arg + strlen(s) + 1;
|
||||||
if (*s == '0') {
|
params[i].nvalue = strtoll(s, &s, 0);
|
||||||
params[i].nvalue = strtol(s, &s, 16);
|
|
||||||
} else {
|
|
||||||
params[i].nvalue = strtol(s, &s, 10);
|
|
||||||
}
|
|
||||||
params[i].flags |= P_CHANGED;
|
params[i].flags |= P_CHANGED;
|
||||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||||
if (i == P_CO) {
|
if (i == P_CO) {
|
||||||
|
@ -152,6 +152,10 @@ doset(arg)
|
||||||
} else {
|
} else {
|
||||||
params[i].nvalue = state;
|
params[i].nvalue = state;
|
||||||
params[i].flags |= P_CHANGED;
|
params[i].flags |= P_CHANGED;
|
||||||
|
if (i == P_HL && state == FALSE) {
|
||||||
|
hl_spat = FALSE;
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -187,7 +191,7 @@ showparms(all)
|
||||||
else if (p->flags & P_TEXT)
|
else if (p->flags & P_TEXT)
|
||||||
sprintf(buf, " %s=%s\n", p->fullname, p->svalue);
|
sprintf(buf, " %s=%s\n", p->fullname, p->svalue);
|
||||||
else
|
else
|
||||||
sprintf(buf, " %s=%ld\n", p->fullname, p->nvalue);
|
sprintf(buf, " %s=%lld\n", p->fullname, (long long)p->nvalue);
|
||||||
|
|
||||||
msg(buf);
|
msg(buf);
|
||||||
n++;
|
n++;
|
||||||
|
@ -205,10 +209,13 @@ int
|
||||||
read_rc(fn)
|
read_rc(fn)
|
||||||
char *fn;
|
char *fn;
|
||||||
{
|
{
|
||||||
if((ffp = fopen(fn, "r")) == NULL) return -1;
|
int i;
|
||||||
|
|
||||||
|
if ((ffp = fopen(fn, "r")) == NULL) return -1;
|
||||||
from_file = 1;
|
from_file = 1;
|
||||||
while(fgets(fbuf, 255, ffp) != NULL) {
|
while (fgets(fbuf, MAXCMD, ffp) != NULL) {
|
||||||
strtok(fbuf, "\n\r");
|
i = strlen(fbuf) - 1;
|
||||||
|
while ((i >= 0) && (fbuf[i] == NL || fbuf[i] == CR)) fbuf[i--] = '\0';
|
||||||
docmdline(fbuf);
|
docmdline(fbuf);
|
||||||
}
|
}
|
||||||
fclose(ffp);
|
fclose(ffp);
|
||||||
|
@ -245,7 +252,7 @@ do_logic(mode, str)
|
||||||
} else if (str[0] == 'b' || str[0] == 'B') {
|
} else if (str[0] == 'b' || str[0] == 'B') {
|
||||||
value = strtol(str + 1, NULL, 2);
|
value = strtol(str + 1, NULL, 2);
|
||||||
} else if (str[0] == '0') {
|
} else if (str[0] == '0') {
|
||||||
value = strtol(str, NULL, 16);
|
value = strtol(str, NULL, 0);
|
||||||
for (n = 0; n < strlen(str); n++) {
|
for (n = 0; n < strlen(str); n++) {
|
||||||
if (!isxdigit(str[n])) {
|
if (!isxdigit(str[n])) {
|
||||||
value = -1;
|
value = -1;
|
||||||
|
@ -311,12 +318,14 @@ getcmdstr(p, x)
|
||||||
int x;
|
int x;
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int n;
|
int i, n;
|
||||||
char *buff, *q;
|
char *buff, *q;
|
||||||
|
|
||||||
if (from_file) {
|
if (from_file) {
|
||||||
if(fgets(p, 255, ffp) != NULL) {
|
if (fgets(p, 255, ffp) != NULL) {
|
||||||
strtok(p, "\n\r");
|
// strtok(p, "\n\r");
|
||||||
|
i = strlen(p) - 1;
|
||||||
|
while ((i >= 0) && (p[i] == NL || p[i] == CR)) p[i--] = '\0';
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -329,6 +338,7 @@ getcmdstr(p, x)
|
||||||
do {
|
do {
|
||||||
switch (c = vgetc()) {
|
switch (c = vgetc()) {
|
||||||
case BVICTRL('H'):
|
case BVICTRL('H'):
|
||||||
|
case ASCII_DEL:
|
||||||
case KEY_BACKSPACE:
|
case KEY_BACKSPACE:
|
||||||
case KEY_LEFT:
|
case KEY_LEFT:
|
||||||
if (p > buff) {
|
if (p > buff) {
|
||||||
|
@ -359,6 +369,9 @@ getcmdstr(p, x)
|
||||||
#if CR != KEY_ENTER
|
#if CR != KEY_ENTER
|
||||||
case CR:
|
case CR:
|
||||||
#endif
|
#endif
|
||||||
|
case KEY_RIGHT:
|
||||||
|
case KEY_UP:
|
||||||
|
case KEY_DOWN:
|
||||||
case KEY_ENTER:
|
case KEY_ENTER:
|
||||||
break;
|
break;
|
||||||
default: /* a normal character */
|
default: /* a normal character */
|
||||||
|
|
9
set.h
|
@ -2,7 +2,7 @@
|
||||||
*
|
*
|
||||||
* NOTE: Edit this file with tabstop=4 !
|
* NOTE: Edit this file with tabstop=4 !
|
||||||
*
|
*
|
||||||
* Copyright 1996-2002 by Gerhard Buergmann
|
* Copyright 1996-2014 by Gerhard Buergmann
|
||||||
* Gerhard.Buergmann@puon.at
|
* Gerhard.Buergmann@puon.at
|
||||||
*
|
*
|
||||||
* 1998-03-14 V 1.0.0
|
* 1998-03-14 V 1.0.0
|
||||||
|
@ -11,6 +11,8 @@
|
||||||
* 1999-07-02 V 1.2.0 beta
|
* 1999-07-02 V 1.2.0 beta
|
||||||
* 1999-08-14 V 1.2.0 final
|
* 1999-08-14 V 1.2.0 final
|
||||||
* 2000-08-21 V 1.3.0 final
|
* 2000-08-21 V 1.3.0 final
|
||||||
|
* 2010-06-02 V 1.3.4
|
||||||
|
* 2013-08-23 V 1.4.0
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
struct param {
|
struct param {
|
||||||
char *fullname; /* full parameter name */
|
char *fullname; /* full parameter name */
|
||||||
char *shortname; /* permissible abbreviation */
|
char *shortname; /* permissible abbreviation */
|
||||||
long nvalue;
|
off_t nvalue;
|
||||||
char *svalue;
|
char *svalue;
|
||||||
int flags;
|
int flags;
|
||||||
};
|
};
|
||||||
|
@ -64,7 +66,8 @@ extern struct param params[];
|
||||||
#define P_LI 13 /* lines */
|
#define P_LI 13 /* lines */
|
||||||
#define P_WL 14 /* Wordlength for w, W, b, B command */
|
#define P_WL 14 /* Wordlength for w, W, b, B command */
|
||||||
#define P_WS 15 /* wrapscan */
|
#define P_WS 15 /* wrapscan */
|
||||||
#define P_CO 16 /* color/attribute setting */
|
#define P_HL 16 /* highlight search enabled */
|
||||||
|
#define P_CO 17 /* color/attribute setting */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macro to get the value of a parameter
|
* Macro to get the value of a parameter
|
||||||
|
|
635
tags
Normal file
|
@ -0,0 +1,635 @@
|
||||||
|
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
||||||
|
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
||||||
|
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
||||||
|
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
||||||
|
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
||||||
|
!_TAG_PROGRAM_VERSION 5.8 //
|
||||||
|
AND bvi.h 88;" d
|
||||||
|
ANSI bmore.h 103;" d
|
||||||
|
ANSI bvi.h 117;" d
|
||||||
|
APPEND comm.c 50;" d file:
|
||||||
|
APPEND comm.c 53;" d file:
|
||||||
|
ASCII bmore.h 82;" d
|
||||||
|
ASCII bvi.h 95;" d
|
||||||
|
A_ATTRIBUTES doscur.h 56;" d
|
||||||
|
A_BLINK doscur.h 54;" d
|
||||||
|
A_BOLD doscur.h 52;" d
|
||||||
|
A_CHARTEXT doscur.h 55;" d
|
||||||
|
A_NORMAL doscur.h 50;" d
|
||||||
|
A_REVERSE doscur.h 53;" d
|
||||||
|
A_STANDOUT doscur.h 51;" d
|
||||||
|
AnzAdd bmore.c /^int AnzAdd;$/;" v
|
||||||
|
AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v
|
||||||
|
Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v
|
||||||
|
Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v
|
||||||
|
Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v
|
||||||
|
BACKWARD bmore.h 84;" d
|
||||||
|
BACKWARD bvi.h 97;" d
|
||||||
|
BLOCK_BEGIN bvi.h /^ BLOCK_BEGIN = 1,$/;" e enum:_block_datum
|
||||||
|
BLOCK_END bvi.h /^ BLOCK_END = 2,$/;" e enum:_block_datum
|
||||||
|
BLOCK_LEN bvi.h /^ BLOCK_LEN = 4$/;" e enum:_block_datum
|
||||||
|
BLOCK_SPECIAL bmore.h 74;" d
|
||||||
|
BLOCK_SPECIAL bvi.h 64;" d
|
||||||
|
BMOBJ Makefile /^BMOBJ = bmore.o bm_unix.o recomp.o$/;" m
|
||||||
|
BS bmore.h 87;" d
|
||||||
|
BS bvi.h 100;" d
|
||||||
|
BUFFER bmore.h 115;" d
|
||||||
|
BUFFER bvi.h 131;" d
|
||||||
|
BVICTRL bmore.h 91;" d
|
||||||
|
BVICTRL bvi.h 103;" d
|
||||||
|
CC Makefile /^CC = gcc$/;" m
|
||||||
|
CFLAGS Makefile /^CFLAGS = -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES$/;" m
|
||||||
|
CHARACTER_SPECIAL bmore.h 73;" d
|
||||||
|
CHARACTER_SPECIAL bvi.h 63;" d
|
||||||
|
CMDLNG bvi.h 105;" d
|
||||||
|
CMDSZ comm.c 56;" d file:
|
||||||
|
COLS dosio.c /^int COLS = 80;$/;" v
|
||||||
|
CR bmore.h 85;" d
|
||||||
|
CR bvi.h 98;" d
|
||||||
|
DEFS Makefile /^DEFS = -DHAVE_CONFIG_H$/;" m
|
||||||
|
DELIM bmore.h 106;" d
|
||||||
|
DELIM bmore.h 111;" d
|
||||||
|
DELIM bvi.h 120;" d
|
||||||
|
DELIM bvi.h 127;" d
|
||||||
|
DIRECTORY bmore.h 72;" d
|
||||||
|
DIRECTORY bvi.h 62;" d
|
||||||
|
ECHO dosio.c /^int ECHO = TRUE;$/;" v
|
||||||
|
END bmore.h 78;" d
|
||||||
|
END bvi.h 68;" d
|
||||||
|
ERR doscur.h 147;" d
|
||||||
|
ERROR bmore.h 69;" d
|
||||||
|
ERROR bvi.h 59;" d
|
||||||
|
ESC bmore.h 88;" d
|
||||||
|
ESC bvi.h 101;" d
|
||||||
|
ESC doscur.h 31;" d
|
||||||
|
FALSE bmore.h 99;" d
|
||||||
|
FALSE bvi.h 113;" d
|
||||||
|
FALSE doscur.h 29;" d
|
||||||
|
FORWARD bmore.h 83;" d
|
||||||
|
FORWARD bvi.h 96;" d
|
||||||
|
HAVE_CURSES_H acconfig.h 5;" d
|
||||||
|
HAVE_FCNTL_H config.h 16;" d
|
||||||
|
HAVE_FCNTL_H dosconf.h 40;" d
|
||||||
|
HAVE_INTTYPES_H config.h 19;" d
|
||||||
|
HAVE_LOCALE_H dosconf.h 44;" d
|
||||||
|
HAVE_MEMMOVE config.h 22;" d
|
||||||
|
HAVE_MEMMOVE dosconf.h 31;" d
|
||||||
|
HAVE_MEMORY_H config.h 25;" d
|
||||||
|
HAVE_NCURSES_H acconfig.h 3;" d
|
||||||
|
HAVE_NCURSES_H config.h 5;" d
|
||||||
|
HAVE_NCURSES_TERM_H acconfig.h 11;" d
|
||||||
|
HAVE_STDINT_H config.h 31;" d
|
||||||
|
HAVE_STDLIB_H config.h 34;" d
|
||||||
|
HAVE_STRDUP config.h 37;" d
|
||||||
|
HAVE_STRDUP dosconf.h 34;" d
|
||||||
|
HAVE_STRERROR config.h 40;" d
|
||||||
|
HAVE_STRINGS_H config.h 43;" d
|
||||||
|
HAVE_STRING_H config.h 46;" d
|
||||||
|
HAVE_STRTOL config.h 49;" d
|
||||||
|
HAVE_STRTOL dosconf.h 37;" d
|
||||||
|
HAVE_SYS_STAT_H config.h 52;" d
|
||||||
|
HAVE_SYS_TYPES_H config.h 55;" d
|
||||||
|
HAVE_TERMCAP_H config.h 58;" d
|
||||||
|
HAVE_TERMIOS_H config.h 61;" d
|
||||||
|
HAVE_TERMIO_H config.h 64;" d
|
||||||
|
HAVE_TERM_H config.h 67;" d
|
||||||
|
HAVE_UNISTD_H config.h 70;" d
|
||||||
|
HEADER Makefile /^HEADER = bvi.h set.h$/;" m
|
||||||
|
HELPFILE bmore.c 42;" d file:
|
||||||
|
HELPFILE bmore.c 44;" d file:
|
||||||
|
HEX bvi.h 94;" d
|
||||||
|
Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v
|
||||||
|
INSTALL Makefile /^INSTALL = \/usr\/bin\/install -c$/;" m
|
||||||
|
INSTALL_DATA Makefile /^INSTALL_DATA = ${INSTALL} -m 644$/;" m
|
||||||
|
INSTALL_PROGRAM Makefile /^INSTALL_PROGRAM = ${INSTALL}$/;" m
|
||||||
|
JOEHTG bvi.h 41;" d
|
||||||
|
KEY_BACKSPACE bvi.h 150;" d
|
||||||
|
KEY_BACKSPACE doscur.h 42;" d
|
||||||
|
KEY_DC doscur.h 45;" d
|
||||||
|
KEY_DOWN doscur.h 34;" d
|
||||||
|
KEY_ENTER doscur.h 41;" d
|
||||||
|
KEY_F doscur.h 33;" d
|
||||||
|
KEY_F0 doscur.h 32;" d
|
||||||
|
KEY_HOME doscur.h 43;" d
|
||||||
|
KEY_IC doscur.h 46;" d
|
||||||
|
KEY_LEFT doscur.h 36;" d
|
||||||
|
KEY_LL doscur.h 44;" d
|
||||||
|
KEY_NPAGE doscur.h 38;" d
|
||||||
|
KEY_PPAGE doscur.h 39;" d
|
||||||
|
KEY_RETURN doscur.h 40;" d
|
||||||
|
KEY_RIGHT doscur.h 37;" d
|
||||||
|
KEY_UP doscur.h 35;" d
|
||||||
|
LDFLAGS Makefile /^LDFLAGS= $/;" m
|
||||||
|
LIBS Makefile /^LIBS = -lncurses $/;" m
|
||||||
|
LINES dosio.c /^int LINES = 25;$/;" v
|
||||||
|
LROTATE bvi.h 86;" d
|
||||||
|
LSHIFT bvi.h 84;" d
|
||||||
|
MAXCMD bmore.h 114;" d
|
||||||
|
MAXCMD bvi.h 130;" d
|
||||||
|
MAXNAME comm.c 57;" d file:
|
||||||
|
MAX_ONE_ARG comm.c 62;" d file:
|
||||||
|
MAX_ONE_FILE comm.c 64;" d file:
|
||||||
|
NEED_PUTC_CHAR acconfig.h 9;" d
|
||||||
|
NEED_PUTC_CHAR bm_unix.c 52;" d file:
|
||||||
|
NEG bvi.h 91;" d
|
||||||
|
NEW bmore.h 71;" d
|
||||||
|
NEW bvi.h 61;" d
|
||||||
|
NL bmore.h 86;" d
|
||||||
|
NL bvi.h 99;" d
|
||||||
|
NODEL dosio.c /^int NODEL = FALSE;$/;" v
|
||||||
|
NOT bvi.h 92;" d
|
||||||
|
NO_ADDR comm.c 59;" d file:
|
||||||
|
NO_ARG comm.c 60;" d file:
|
||||||
|
NO_SYSERRL acconfig.h 7;" d
|
||||||
|
NULL bmore.h 94;" d
|
||||||
|
NULL bvi.h 108;" d
|
||||||
|
OBJS Makefile /^OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o$/;" m
|
||||||
|
OFF_T_MAX io.c 46;" d file:
|
||||||
|
ONE bmore.h 79;" d
|
||||||
|
ONE bvi.h 69;" d
|
||||||
|
ONE_ARG comm.c 61;" d file:
|
||||||
|
ONE_FILE comm.c 63;" d file:
|
||||||
|
OR bvi.h 89;" d
|
||||||
|
P set.h 75;" d
|
||||||
|
PARTIAL bmore.h 75;" d
|
||||||
|
PARTIAL bvi.h 65;" d
|
||||||
|
PRINTF bmore.c 37;" d file:
|
||||||
|
PRINTF bmore.c 39;" d file:
|
||||||
|
PTR bmore.h 104;" d
|
||||||
|
PTR bmore.h 110;" d
|
||||||
|
PTR bvi.h 118;" d
|
||||||
|
PTR bvi.h 126;" d
|
||||||
|
P_AW set.h 53;" d
|
||||||
|
P_BOOL set.h 41;" d
|
||||||
|
P_CHANGED set.h 44;" d
|
||||||
|
P_CM set.h 54;" d
|
||||||
|
P_CO set.h 70;" d
|
||||||
|
P_EB set.h 55;" d
|
||||||
|
P_HL set.h 69;" d
|
||||||
|
P_IC set.h 56;" d
|
||||||
|
P_LI set.h 66;" d
|
||||||
|
P_MA set.h 57;" d
|
||||||
|
P_MM set.h 58;" d
|
||||||
|
P_MO set.h 62;" d
|
||||||
|
P_NUM set.h 42;" d
|
||||||
|
P_OF set.h 59;" d
|
||||||
|
P_RO set.h 60;" d
|
||||||
|
P_SS set.h 61;" d
|
||||||
|
P_TE set.h 64;" d
|
||||||
|
P_TEXT set.h 43;" d
|
||||||
|
P_TT set.h 63;" d
|
||||||
|
P_US set.h 65;" d
|
||||||
|
P_WL set.h 67;" d
|
||||||
|
P_WS set.h 68;" d
|
||||||
|
REGULAR bmore.h 70;" d
|
||||||
|
REGULAR bvi.h 60;" d
|
||||||
|
REPLACE bmore.h 90;" d
|
||||||
|
RROTATE bvi.h 87;" d
|
||||||
|
RSHIFT bvi.h 85;" d
|
||||||
|
SEARCH bmore.h 89;" d
|
||||||
|
SEARCH bvi.h 102;" d
|
||||||
|
SHELL Makefile /^SHELL = \/bin\/sh$/;" m
|
||||||
|
SIZEOF_INT config.h 73;" d
|
||||||
|
SIZEOF_LONG config.h 76;" d
|
||||||
|
SIZEOF_VOID_P config.h 79;" d
|
||||||
|
SKIP_WHITE bvi.h 133;" d
|
||||||
|
STAR bmore.h 80;" d
|
||||||
|
STAR bvi.h 70;" d
|
||||||
|
STDC_HEADERS config.h 82;" d
|
||||||
|
STDC_HEADERS dosconf.h 28;" d
|
||||||
|
S_GLOBAL bvi.h 81;" d
|
||||||
|
S_ISBLK bvi.h 199;" d
|
||||||
|
S_ISCHR bvi.h 198;" d
|
||||||
|
S_ISDIR bvi.h 197;" d
|
||||||
|
S_ISFIFO bvi.h 201;" d
|
||||||
|
S_ISREG bvi.h 200;" d
|
||||||
|
TBUFSIZ bm_dos.c 32;" d file:
|
||||||
|
TBUFSIZ bm_unix.c 32;" d file:
|
||||||
|
TRUE bmore.h 98;" d
|
||||||
|
TRUE bvi.h 112;" d
|
||||||
|
TRUE doscur.h 28;" d
|
||||||
|
U_APPEND bvi.h 78;" d
|
||||||
|
U_BACK bvi.h 77;" d
|
||||||
|
U_DELETE bvi.h 76;" d
|
||||||
|
U_EDIT bvi.h 73;" d
|
||||||
|
U_INSERT bvi.h 75;" d
|
||||||
|
U_TILDE bvi.h 79;" d
|
||||||
|
U_TRUNC bvi.h 74;" d
|
||||||
|
VERSION patchlevel.h 1;" d
|
||||||
|
WINDOW doscur.h 60;" d
|
||||||
|
WRITE comm.c 49;" d file:
|
||||||
|
WRITE comm.c 52;" d file:
|
||||||
|
XOR bvi.h 90;" d
|
||||||
|
_block_datum bvi.h /^typedef enum _block_datum {$/;" g
|
||||||
|
ac_fn_c_check_func configure /^ac_fn_c_check_func ()$/;" f
|
||||||
|
ac_fn_c_check_header_compile configure /^ac_fn_c_check_header_compile ()$/;" f
|
||||||
|
ac_fn_c_check_header_mongrel configure /^ac_fn_c_check_header_mongrel ()$/;" f
|
||||||
|
ac_fn_c_check_type configure /^ac_fn_c_check_type ()$/;" f
|
||||||
|
ac_fn_c_compute_int configure /^ac_fn_c_compute_int ()$/;" f
|
||||||
|
ac_fn_c_try_compile configure /^ac_fn_c_try_compile ()$/;" f
|
||||||
|
ac_fn_c_try_cpp configure /^ac_fn_c_try_cpp ()$/;" f
|
||||||
|
ac_fn_c_try_link configure /^ac_fn_c_try_link ()$/;" f
|
||||||
|
ac_fn_c_try_run configure /^ac_fn_c_try_run ()$/;" f
|
||||||
|
act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v
|
||||||
|
addch doscur.h 95;" d
|
||||||
|
addfile dosio.c /^addfile(char *fname)$/;" f
|
||||||
|
addfile io.c /^addfile(fname)$/;" f
|
||||||
|
addr_flag comm.c /^int addr_flag;$/;" v
|
||||||
|
addr_form bmore.c /^char addr_form[15];$/;" v
|
||||||
|
addr_form bvi.c /^char addr_form[15];$/;" v
|
||||||
|
addstr doscur.h 99;" d
|
||||||
|
again recomp.c /^int again = 0;$/;" v
|
||||||
|
alloc_buf dosio.c /^alloc_buf(off_t n, char **buffer)$/;" f
|
||||||
|
alloc_buf io.c /^alloc_buf(n, buffer)$/;" f
|
||||||
|
altfile comm.c /^static char *altfile = NULL; \/* alternate file *\/$/;" v file:
|
||||||
|
ambigous comm.c /^char *ambigous = "Ambigous|Too many file names";$/;" v
|
||||||
|
ambvalue comm.c /^char *ambvalue = "Ambigous|Too many values";$/;" v
|
||||||
|
arrnum bmore.c /^int arrnum = 0;$/;" v
|
||||||
|
arrnum bvi.c /^int arrnum = 0;$/;" v
|
||||||
|
as_fn_append config.status /^ as_fn_append ()$/;" f
|
||||||
|
as_fn_append configure /^ as_fn_append ()$/;" f
|
||||||
|
as_fn_arith config.status /^ as_fn_arith ()$/;" f
|
||||||
|
as_fn_arith configure /^ as_fn_arith ()$/;" f
|
||||||
|
as_fn_error config.status /^as_fn_error ()$/;" f
|
||||||
|
as_fn_error configure /^as_fn_error ()$/;" f
|
||||||
|
as_fn_exit config.status /^as_fn_exit ()$/;" f
|
||||||
|
as_fn_exit configure /^as_fn_exit ()$/;" f
|
||||||
|
as_fn_failure configure /^as_fn_failure () { as_fn_return 1; }$/;" f
|
||||||
|
as_fn_mkdir_p config.status /^as_fn_mkdir_p ()$/;" f
|
||||||
|
as_fn_mkdir_p configure /^as_fn_mkdir_p ()$/;" f
|
||||||
|
as_fn_ret_failure configure /^as_fn_ret_failure () { return 1; }$/;" f
|
||||||
|
as_fn_ret_success configure /^as_fn_ret_success () { return 0; }$/;" f
|
||||||
|
as_fn_set_status config.status /^as_fn_set_status ()$/;" f
|
||||||
|
as_fn_set_status configure /^as_fn_set_status ()$/;" f
|
||||||
|
as_fn_success configure /^as_fn_success () { as_fn_return 0; }$/;" f
|
||||||
|
as_fn_unset config.status /^as_fn_unset ()$/;" f
|
||||||
|
as_fn_unset configure /^as_fn_unset ()$/;" f
|
||||||
|
ascii_comp recomp.c /^ascii_comp(smem, pattern)$/;" f
|
||||||
|
ascii_flag bmore.c /^int ascii_flag = 0;$/;" v
|
||||||
|
attrset dosio.c /^attrset(int attr)$/;" f
|
||||||
|
backsearch re.c /^backsearch(start, mode)$/;" f
|
||||||
|
beep doscur.h 76;" d
|
||||||
|
bindir Makefile /^bindir = $(DESTDIR)${exec_prefix}\/bin$/;" m
|
||||||
|
block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v
|
||||||
|
block_datum bvi.h /^} block_datum;$/;" t typeref:enum:_block_datum
|
||||||
|
block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v
|
||||||
|
block_flag bvi.c /^int block_flag = 0;$/;" v
|
||||||
|
block_read io.c /^static off_t block_read;$/;" v file:
|
||||||
|
block_size bvi.c /^off_t block_begin, block_end, block_size;$/;" v
|
||||||
|
bmbeep bmore.c /^bmbeep() {$/;" f
|
||||||
|
bmore_search_pat bmore.c /^char bmore_search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v
|
||||||
|
bmregexec bmore.c /^bmregexec(scan)$/;" f
|
||||||
|
bmsearch bmore.c /^bmsearch(ch)$/;" f
|
||||||
|
bregexec re.c /^bregexec(start, scan)$/;" f
|
||||||
|
buf comm.c /^static struct stat buf;$/;" v typeref:struct:stat file:
|
||||||
|
buf dosio.c /^static struct stat buf;$/;" v typeref:struct:stat file:
|
||||||
|
buf io.c /^static struct stat buf;$/;" v typeref:struct:stat file:
|
||||||
|
buf set.c /^static char buf[64];$/;" v file:
|
||||||
|
buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v
|
||||||
|
buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v
|
||||||
|
bvi_init dosio.c /^bvi_init(char *dir)$/;" f
|
||||||
|
bvi_init io.c /^bvi_init(dir)$/;" f
|
||||||
|
bytepos bmore.c /^off_t bytepos, oldpos;$/;" v
|
||||||
|
c_argc comm.c /^static int c_argc = 0;$/;" v file:
|
||||||
|
c_argv comm.c /^static char *c_argv[9];$/;" v file:
|
||||||
|
c_flag bmore.c /^int c_flag = 0, d_flag = 0;$/;" v
|
||||||
|
calc_addr re.c /^calc_addr(pointer, def_addr)$/;" f
|
||||||
|
calc_size bvi.c /^calc_size(arg)$/;" f
|
||||||
|
cbreak doscur.h 136;" d
|
||||||
|
chk_comm comm.c /^chk_comm(flag)$/;" f
|
||||||
|
chtype doscur.h 58;" d
|
||||||
|
clear doscur.h 83;" d
|
||||||
|
clear_marks edit.c /^clear_marks()$/;" f
|
||||||
|
clear_sc bm_unix.c /^char *clear_sc; \/* clear screen *\/$/;" v
|
||||||
|
clearscreen bm_dos.c /^clearscreen()$/;" f
|
||||||
|
clearscreen bm_unix.c /^clearscreen()$/;" f
|
||||||
|
clearstr comm.c /^clearstr()$/;" f
|
||||||
|
cleartoeol bm_dos.c /^cleartoeol()$/;" f
|
||||||
|
cleartoeol bm_unix.c /^cleartoeol()$/;" f
|
||||||
|
clrtoeol doscur.h 79;" d
|
||||||
|
cmdbuf bmore.c /^static char cmdbuf[MAXCMD];$/;" v file:
|
||||||
|
cmdstr bvi.c /^char cmdstr[MAXCMD + 1] = "";$/;" v
|
||||||
|
cnt bmore.c /^static int cnt = 0;$/;" v file:
|
||||||
|
contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v
|
||||||
|
contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v
|
||||||
|
copyright bmore.c /^char *copyright = "Copyright (C) 1990-2013 by Gerhard Buergmann";$/;" v
|
||||||
|
copyright bvi.c /^char *copyright = "Copyright (C) 1996-2013 by Gerhard Buergmann";$/;" v
|
||||||
|
corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v
|
||||||
|
cur_back edit.c /^cur_back()$/;" f
|
||||||
|
cur_forw edit.c /^cur_forw(check)$/;" f
|
||||||
|
curfile bvi.c /^int curfile; \/* number of the current file *\/$/;" v
|
||||||
|
curpos bvi.c /^PTR curpos;$/;" v
|
||||||
|
curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v
|
||||||
|
current bvi.c /^PTR current;$/;" v
|
||||||
|
current_start bvi.c /^PTR current_start;$/;" v
|
||||||
|
d_flag bmore.c /^int c_flag = 0, d_flag = 0;$/;" v
|
||||||
|
d_memcpy dosio.c /^d_memcpy(PTR dest, PTR src, off_t n)$/;" f
|
||||||
|
d_memmove dosio.c /^d_memmove(PTR dest, PTR src, off_t n)$/;" f
|
||||||
|
datarootdir Makefile /^datarootdir = ${prefix}\/share$/;" m
|
||||||
|
dbug bm_dos.c /^FILE *dbug;$/;" v
|
||||||
|
delch dosio.c /^delch()$/;" f
|
||||||
|
deleteln doscur.h 110;" d
|
||||||
|
dlines bm_unix.c /^int dum_opt, dlines;$/;" v
|
||||||
|
do_append bvi.c /^do_append(count, buf)$/;" f
|
||||||
|
do_back edit.c /^do_back(n, start)$/;" f
|
||||||
|
do_delete edit.c /^do_delete(n, start)$/;" f
|
||||||
|
do_exit comm.c /^do_exit()$/;" f
|
||||||
|
do_ft edit.c /^do_ft(ch, flag)$/;" f
|
||||||
|
do_header bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v
|
||||||
|
do_ins_chg edit.c /^do_ins_chg(start, arg, mode)$/;" f
|
||||||
|
do_logic set.c /^do_logic(mode, str)$/;" f
|
||||||
|
do_mark edit.c /^do_mark(mark, addr)$/;" f
|
||||||
|
do_next bmore.c /^do_next(n)$/;" f
|
||||||
|
do_over bvi.c /^do_over(loc, n, buf)$/;" f
|
||||||
|
do_put bvi.c /^do_put(loc, n, buf)$/;" f
|
||||||
|
do_shell dosio.c /^do_shell()$/;" f
|
||||||
|
do_shell io.c /^do_shell()$/;" f
|
||||||
|
do_substitution re.c /^do_substitution(delim, line, startpos, endpos)$/;" f
|
||||||
|
do_tilde bvi.c /^do_tilde(count)$/;" f
|
||||||
|
do_undo bvi.c /^do_undo()$/;" f
|
||||||
|
do_z edit.c /^do_z(mode)$/;" f
|
||||||
|
docmdline comm.c /^docmdline(cmdline)$/;" f
|
||||||
|
doecmd comm.c /^doecmd(arg, force)$/;" f
|
||||||
|
doset set.c /^doset(arg)$/;" f
|
||||||
|
doshell bm_dos.c /^doshell(cmd)$/;" f
|
||||||
|
doshell bm_unix.c /^doshell(cmd)$/;" f
|
||||||
|
doupdate doscur.h 143;" d
|
||||||
|
dum_opt bm_unix.c /^int dum_opt, dlines;$/;" v
|
||||||
|
dup_print_flag bmore.c /^int dup_print_flag = 0;$/;" v
|
||||||
|
echo doscur.h 128;" d
|
||||||
|
edit edit.c /^edit(mode)$/;" f
|
||||||
|
edits bvi.c /^int edits = 0;$/;" v
|
||||||
|
emptyclass bmore.c /^char *emptyclass = "Empty byte class '[]' or '[^]'";$/;" v
|
||||||
|
emptyclass re.c /^char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot match";$/;" v
|
||||||
|
emsg bmore.c /^emsg(s)$/;" f
|
||||||
|
emsg comm.c /^emsg(s)$/;" f
|
||||||
|
end_addr comm.c /^PTR end_addr;$/;" v
|
||||||
|
end_word re.c /^end_word(start)$/;" f
|
||||||
|
endwin doscur.h 137;" d
|
||||||
|
enlarge dosio.c /^enlarge(off_t add)$/;" f
|
||||||
|
enlarge io.c /^enlarge(add)$/;" f
|
||||||
|
env bvi.c /^jmp_buf env; \/* context for `longjmp' function *\/$/;" v
|
||||||
|
erase doscur.h 81;" d
|
||||||
|
erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v
|
||||||
|
erasechar doscur.h 75;" d
|
||||||
|
estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v
|
||||||
|
exec_prefix Makefile /^exec_prefix = ${prefix}$/;" m
|
||||||
|
extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v
|
||||||
|
exval bmore.c /^int exval = 0;$/;" v
|
||||||
|
fbuf set.c /^static char fbuf[256];$/;" v file:
|
||||||
|
ffp set.c /^static FILE *ffp;$/;" v file:
|
||||||
|
file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v
|
||||||
|
fileinfo edit.c /^fileinfo(fname)$/;" f
|
||||||
|
filemode dosio.c /^int filemode;$/;" v
|
||||||
|
filemode io.c /^int filemode;$/;" v
|
||||||
|
files bmore.c /^char **files; \/* list of input files *\/$/;" v
|
||||||
|
files bvi.c /^char **files; \/* list of input files *\/$/;" v
|
||||||
|
filesize bmore.c /^off_t screen_home, filesize;$/;" v
|
||||||
|
filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v
|
||||||
|
flags set.h /^ int flags;$/;" m struct:param
|
||||||
|
flash doscur.h 77;" d
|
||||||
|
flushinp doscur.h 120;" d
|
||||||
|
fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v
|
||||||
|
from_file set.c /^static int from_file = 0;$/;" v file:
|
||||||
|
fsearch re.c /^fsearch(start, end, smem)$/;" f
|
||||||
|
fsearch_end re.c /^fsearch_end(start, end, smem, s_end)$/;" f
|
||||||
|
fullname set.h /^ char *fullname; \/* full parameter name *\/$/;" m struct:param
|
||||||
|
getbegyx doscur.h 105;" d
|
||||||
|
getcbuff edit.c /^static char getcbuff[BUFFER];$/;" v file:
|
||||||
|
getch dosio.c /^getch()$/;" f
|
||||||
|
getcmdstr set.c /^getcmdstr(p, x)$/;" f
|
||||||
|
getcnext edit.c /^static char *getcnext = NULL;$/;" v file:
|
||||||
|
getmaxyx doscur.h 106;" d
|
||||||
|
getyx doscur.h 104;" d
|
||||||
|
got_int bm_dos.c /^int got_int;$/;" v
|
||||||
|
got_int bm_unix.c /^int got_int;$/;" v
|
||||||
|
help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v
|
||||||
|
helpdir Makefile /^helpdir = $(DESTDIR)${datarootdir}\/bvi$/;" m
|
||||||
|
helppath bmore.c /^char helppath[MAXCMD];$/;" v
|
||||||
|
hex_comp recomp.c /^hex_comp(smem, pattern)$/;" f
|
||||||
|
hexchar recomp.c /^hexchar()$/;" f
|
||||||
|
highlight bm_dos.c /^highlight()$/;" f
|
||||||
|
highlight bm_unix.c /^highlight()$/;" f
|
||||||
|
hl_spat edit.c /^long hl_spat = 0;$/;" v
|
||||||
|
home bm_dos.c /^home()$/;" f
|
||||||
|
home bm_unix.c /^home()$/;" f
|
||||||
|
icnt bmore.c /^static int icnt = 0;$/;" v file:
|
||||||
|
idlok doscur.h 141;" d
|
||||||
|
ignore_case recomp.c /^int ignore_case = 0;$/;" v
|
||||||
|
inch dosio.c /^inch()$/;" f
|
||||||
|
init_byte bmore.c /^off_t init_byte = 0;$/;" v
|
||||||
|
init_search bmore.c /^int init_search = 0;$/;" v
|
||||||
|
initscr doscur.h 73;" d
|
||||||
|
initterm bm_dos.c /^initterm()$/;" f
|
||||||
|
initterm bm_unix.c /^initterm()$/;" f
|
||||||
|
insch dosio.c /^insch(int c)$/;" f
|
||||||
|
insertln doscur.h 108;" d
|
||||||
|
jmpproc bvi.c /^jmpproc(sig)$/;" f
|
||||||
|
keypad doscur.h 133;" d
|
||||||
|
last_motion bvi.c /^PTR last_motion;$/;" v
|
||||||
|
last_search bmore.c /^off_t last_search = 0;$/;" v
|
||||||
|
libdir Makefile /^libdir = $(DESTDIR)${exec_prefix}\/lib$/;" m
|
||||||
|
linbuf edit.c /^char linbuf[16384];$/;" v
|
||||||
|
line bvi.c /^static char line[MAXCMD];$/;" v file:
|
||||||
|
lineout edit.c /^lineout()$/;" f
|
||||||
|
load dosio.c /^load(char *fname)$/;" f
|
||||||
|
load io.c /^load(fname)$/;" f
|
||||||
|
loc bvi.c /^int loc;$/;" v
|
||||||
|
magic recomp.c /^int magic = 1;$/;" v
|
||||||
|
main bmore.c /^main(argc, argv)$/;" f
|
||||||
|
main bvi.c /^main(argc, argv)$/;" f
|
||||||
|
man1dir Makefile /^man1dir = $(mandir)\/man1$/;" m
|
||||||
|
mandir Makefile /^mandir = $(DESTDIR)${datarootdir}\/man$/;" m
|
||||||
|
mark bvi.c /^static int mark;$/;" v file:
|
||||||
|
markbuf bvi.c /^PTR markbuf[26];$/;" v
|
||||||
|
maxpos bvi.c /^PTR maxpos;$/;" v
|
||||||
|
maxx bmore.c /^int maxx, maxy;$/;" v
|
||||||
|
maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v
|
||||||
|
maxy bmore.c /^int maxx, maxy;$/;" v
|
||||||
|
maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v
|
||||||
|
mem bvi.c /^PTR mem = NULL;$/;" v
|
||||||
|
memcpy bvi.h 123;" d
|
||||||
|
memmove bm_unix.c /^memmove(s1, s2, n)$/;" f
|
||||||
|
memmove bvi.h 124;" d
|
||||||
|
memmove io.c /^memmove(s1, s2, n)$/;" f
|
||||||
|
memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v
|
||||||
|
morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v
|
||||||
|
move doscur.h 91;" d
|
||||||
|
movebyte edit.c /^movebyte()$/;" f
|
||||||
|
msg comm.c /^msg(s)$/;" f
|
||||||
|
mvaddch doscur.h 93;" d
|
||||||
|
mvaddstr doscur.h 97;" d
|
||||||
|
mvgetch doscur.h 112;" d
|
||||||
|
mvgetstr doscur.h 115;" d
|
||||||
|
mvinch dosio.c /^mvinch(int y, int x)$/;" f
|
||||||
|
mvinsch doscur.h 125;" d
|
||||||
|
mvprintw doscur.h 101;" d
|
||||||
|
mvscanw doscur.h 122;" d
|
||||||
|
mvwaddch doscur.h 92;" d
|
||||||
|
mvwaddstr doscur.h 96;" d
|
||||||
|
mvwgetch doscur.h 111;" d
|
||||||
|
mvwgetstr doscur.h 114;" d
|
||||||
|
mvwprintw doscur.h 100;" d
|
||||||
|
mvwscanw doscur.h 121;" d
|
||||||
|
mymaxx bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v
|
||||||
|
mymaxy bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v
|
||||||
|
name bmore.c /^char *name = NULL;$/;" v
|
||||||
|
name bvi.c /^char *name = NULL;$/;" v
|
||||||
|
new_screen edit.c /^new_screen()$/;" f
|
||||||
|
newwin doscur.h 74;" d
|
||||||
|
nextchar bmore.c /^nextchar()$/;" f
|
||||||
|
nl doscur.h 131;" d
|
||||||
|
no_intty bm_dos.c /^int no_intty, no_tty;$/;" v
|
||||||
|
no_intty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v
|
||||||
|
no_tty bm_dos.c /^int no_intty, no_tty;$/;" v
|
||||||
|
no_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v
|
||||||
|
noaddr comm.c /^char *noaddr = "No address allowed@on this command";$/;" v
|
||||||
|
nobytes bvi.c /^char *nobytes = "No bytes@in the buffer";$/;" v
|
||||||
|
nodelay doscur.h 127;" d
|
||||||
|
noecho doscur.h 129;" d
|
||||||
|
nonl doscur.h 132;" d
|
||||||
|
noprev re.c /^char *noprev = "No previous expression";$/;" v
|
||||||
|
noraw doscur.h 139;" d
|
||||||
|
normal bm_dos.c /^normal()$/;" f
|
||||||
|
normal bm_unix.c /^normal()$/;" f
|
||||||
|
notfound re.c /^char *notfound = "Fail|Pattern not found";$/;" v
|
||||||
|
notimeout doscur.h 140;" d
|
||||||
|
noval comm.c /^char *noval = "No value@for binary operation";$/;" v
|
||||||
|
nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v
|
||||||
|
nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:
|
||||||
|
numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v
|
||||||
|
numarr bvi.c /^char numarr[MAXCMD]; \/* string for collecting number *\/$/;" v
|
||||||
|
numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v
|
||||||
|
numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v
|
||||||
|
nvalue set.h /^ off_t nvalue;$/;" m struct:param
|
||||||
|
off_t bmore.h 105;" d
|
||||||
|
off_t bvi.h 119;" d
|
||||||
|
oldbuf comm.c /^static char oldbuf[CMDSZ]; \/** for :!! command **\/$/;" v file:
|
||||||
|
oldpos bmore.c /^off_t bytepos, oldpos;$/;" v
|
||||||
|
open_file bmore.c /^open_file(name)$/;" f
|
||||||
|
ostate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:termios
|
||||||
|
out_len bmore.c /^int out_len;$/;" v
|
||||||
|
outmsg comm.c /^outmsg(s)$/;" f
|
||||||
|
pagepos bvi.c /^PTR pagepos;$/;" v
|
||||||
|
param set.h /^struct param {$/;" s
|
||||||
|
params set.c /^struct param params[] = {$/;" v typeref:struct:param
|
||||||
|
patcpy re.c /^patcpy(s1, s2, delim)$/;" f
|
||||||
|
pattern re.c /^char pattern[MAXCMD + 1];$/;" v
|
||||||
|
poi recomp.c /^char *poi;$/;" v
|
||||||
|
precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v
|
||||||
|
precount bvi.c /^long precount = -1;$/;" v
|
||||||
|
prefix Makefile /^prefix = \/usr\/local$/;" m
|
||||||
|
printline edit.c /^printline(mempos, scpos)$/;" f
|
||||||
|
printout bmore.c /^printout(lns)$/;" f
|
||||||
|
printw doscur.h 103;" d
|
||||||
|
progname bmore.c /^static char progname[10];$/;" v file:
|
||||||
|
progname bvi.c /^static char progname[8];$/;" v file:
|
||||||
|
prompt bmore.c /^int prompt = 1;$/;" v
|
||||||
|
prototypes configure /^ function prototypes and stuff, but not '\\xHH' hex character constants.$/;" f
|
||||||
|
pushback bmore.c /^pushback(n, where)$/;" f
|
||||||
|
putchr bm_unix.c /^putchr(ch)$/;" f
|
||||||
|
putchr bm_unix.c /^putchr(char ch)$/;" f
|
||||||
|
putline bmore.c /^putline(buf, num)$/;" f
|
||||||
|
quit edit.c /^quit()$/;" f
|
||||||
|
range bvi.c /^range(ch)$/;" f
|
||||||
|
raw doscur.h 138;" d
|
||||||
|
rdline bmore.c /^rdline(ch, sstring)$/;" f
|
||||||
|
read_rc set.c /^read_rc(fn)$/;" f
|
||||||
|
refresh doscur.h 134;" d
|
||||||
|
rep_buf bvi.c /^char rep_buf[BUFFER];$/;" v
|
||||||
|
repaint edit.c /^repaint() \/***** redraw screen *********************\/$/;" f
|
||||||
|
repl_count comm.c /^int repl_count = -1;$/;" v
|
||||||
|
reset_tty bm_dos.c /^reset_tty ()$/;" f
|
||||||
|
reset_tty bm_unix.c /^reset_tty()$/;" f
|
||||||
|
resetty doscur.h 145;" d
|
||||||
|
rev_end bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v
|
||||||
|
rev_start bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v
|
||||||
|
rsearch re.c /^rsearch(start, end, smem)$/;" f
|
||||||
|
save dosio.c /^save(char *fname, PTR start, PTR end, int flags)$/;" f
|
||||||
|
save io.c /^save(fname, start, end, flags)$/;" f
|
||||||
|
save_chk comm.c /^save_chk(fname, start, end, flags)$/;" f
|
||||||
|
savetty doscur.h 144;" d
|
||||||
|
sbracket bmore.c /^sbracket(start, scan, count)$/;" f
|
||||||
|
sbracket re.c /^sbracket(start, scan, count)$/;" f file:
|
||||||
|
scanw doscur.h 124;" d
|
||||||
|
scr dosio.c /^struct WINDOW scr;$/;" v typeref:struct:WINDOW
|
||||||
|
screen bvi.c /^int screen, status;$/;" v
|
||||||
|
screen_home bmore.c /^off_t screen_home, filesize;$/;" v
|
||||||
|
scrolldown edit.c /^scrolldown(lns)$/;" f
|
||||||
|
scrollok doscur.h 142;" d
|
||||||
|
scrollup edit.c /^scrollup(lns)$/;" f
|
||||||
|
scrolly bvi.c /^static int scrolly;$/;" v file:
|
||||||
|
search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v
|
||||||
|
searching re.c /^searching(ch, line, startpos, endpos, flag)$/;" f
|
||||||
|
set_tty bm_dos.c /^set_tty ()$/;" f
|
||||||
|
set_tty bm_unix.c /^set_tty()$/;" f
|
||||||
|
setcur edit.c /^setcur()$/;" f
|
||||||
|
setpage edit.c /^setpage(addr)$/;" f
|
||||||
|
shell bvi.c /^char *shell;$/;" v
|
||||||
|
shortname set.h /^ char *shortname; \/* permissible abbreviation *\/$/;" m struct:param
|
||||||
|
showparms set.c /^showparms(all)$/;" f
|
||||||
|
sig bm_dos.c /^sig()$/;" f
|
||||||
|
sig bm_unix.c /^sig(sig)$/;" f
|
||||||
|
size bvi.c /^off_t size;$/;" v
|
||||||
|
slow_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v
|
||||||
|
smode bmore.c /^static int smode;$/;" v file:
|
||||||
|
smode recomp.c /^int smode;$/;" v
|
||||||
|
smsg comm.c /^smsg(s)$/;" f
|
||||||
|
spos bvi.c /^PTR spos;$/;" v
|
||||||
|
srcdir Makefile /^srcdir = .$/;" m
|
||||||
|
sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v
|
||||||
|
standend doscur.h 89;" d
|
||||||
|
standout doscur.h 88;" d
|
||||||
|
start_addr comm.c /^PTR start_addr;$/;" v
|
||||||
|
statpos edit.c /^statpos()$/;" f
|
||||||
|
status bvi.c /^int screen, status;$/;" v
|
||||||
|
stdscr dosio.c /^int stdscr = 0;$/;" v
|
||||||
|
strcasecmp bmore.h 108;" d
|
||||||
|
strcasecmp bvi.h 122;" d
|
||||||
|
strdup io.c /^strdup(s)$/;" f
|
||||||
|
string bmore.c /^char string[MAXCMD];$/;" v
|
||||||
|
string bvi.c /^char string[MAXCMD];$/;" v
|
||||||
|
strncasecmp bmore.h 107;" d
|
||||||
|
strncasecmp bvi.h 121;" d
|
||||||
|
stty bm_unix.c 34;" d file:
|
||||||
|
stuffin edit.c /^stuffin(s)$/;" f
|
||||||
|
svalue set.h /^ char *svalue;$/;" m struct:param
|
||||||
|
sysemsg comm.c /^sysemsg(s)$/;" f
|
||||||
|
terminal dosio.c /^char *terminal = "ansi";$/;" v
|
||||||
|
terminal io.c /^char *terminal;$/;" v
|
||||||
|
tmpbuf edit.c /^char tmpbuf[10];$/;" v
|
||||||
|
to_print bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v
|
||||||
|
toggle edit.c /^toggle()$/;" f
|
||||||
|
trunc_cur bvi.c /^trunc_cur()$/;" f
|
||||||
|
undo_buf bvi.c /^char *undo_buf = NULL;$/;" v
|
||||||
|
undo_count bvi.c /^off_t undo_count;$/;" v
|
||||||
|
undo_start bvi.c /^PTR undo_start;$/;" v
|
||||||
|
undosize bvi.c /^off_t filesize, memsize, undosize;$/;" v
|
||||||
|
usage bmore.c /^usage()$/;" f
|
||||||
|
usage bvi.c /^usage()$/;" f
|
||||||
|
vgetc bm_dos.c /^vgetc()$/;" f
|
||||||
|
vgetc bm_unix.c /^vgetc()$/;" f
|
||||||
|
vgetc edit.c /^vgetc()$/;" f
|
||||||
|
waddch doscur.h 94;" d
|
||||||
|
waddstr doscur.h 98;" d
|
||||||
|
wait_return comm.c /^wait_return(flag)$/;" f
|
||||||
|
wclear doscur.h 82;" d
|
||||||
|
wclrtoeol doscur.h 78;" d
|
||||||
|
wdeleteln doscur.h 109;" d
|
||||||
|
werase doscur.h 80;" d
|
||||||
|
wgetch doscur.h 113;" d
|
||||||
|
wgetstr doscur.h 116;" d
|
||||||
|
winsertln doscur.h 107;" d
|
||||||
|
wmove doscur.h 90;" d
|
||||||
|
wordsearch re.c /^wordsearch(start, mode)$/;" f
|
||||||
|
wprintw doscur.h 102;" d
|
||||||
|
wrefresh doscur.h 135;" d
|
||||||
|
wrstat bvi.c /^static int wrstat = 1;$/;" v file:
|
||||||
|
wscanw doscur.h 123;" d
|
||||||
|
x bvi.c /^int maxx, maxy, x, xx, y;$/;" v
|
||||||
|
xpos edit.c /^xpos()$/;" f
|
||||||
|
xx bvi.c /^int maxx, maxy, x, xx, y;$/;" v
|
||||||
|
y bvi.c /^int maxx, maxy, x, xx, y;$/;" v
|
||||||
|
yank_buf bvi.c /^char *yank_buf = NULL;$/;" v
|
||||||
|
yanked bvi.c /^off_t yanked = 0L;$/;" v
|
||||||
|
yd_addr comm.c /^yd_addr()$/;" f
|