mirror of https://github.com/vbatts/bvi.git
Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Gerhard Bürgmann | 40e8e886bc | |
Gerhard Bürgmann | be3c9f064d | |
Gerhard Bürgmann | 12a0ed970c |
85
CHANGES
85
CHANGES
|
@ -1,3 +1,88 @@
|
|||
New in release 1.4.1
|
||||
====================
|
||||
|
||||
* Minor fixes
|
||||
|
||||
|
||||
New in release 1.4.1rc
|
||||
======================
|
||||
|
||||
* Compile warning: implicit declaration of function ‘save_chk’ fixed (SF bug #9)
|
||||
* bmore seg fault on file not found fixed
|
||||
* set columns prevents filename display on the commandline fixed (SF bug #8)
|
||||
* bmore new option -r
|
||||
bvi new setting: set reverse
|
||||
Characters between 160 - 254 are displayed as "reverse video text" as used in
|
||||
some legacy systems (Atari, Commodore, Apple II, etc).
|
||||
* castings fixed in comm.c
|
||||
|
||||
|
||||
New in release 1.4.0
|
||||
====================
|
||||
|
||||
* 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
|
||||
====================
|
||||
|
||||
* configure: checking term.h and ncurses/term.h
|
||||
* cast in bmore.c in putline();
|
||||
* ported to compile under DJGPP v2.0 w/ PDCURSES (by simoN)
|
||||
* fixed multiple file handling for "bmore" (by simoN)
|
||||
* renamed several local screen processing routines to avoid compiler conflicts
|
||||
* several minor fixes to "bmore" code (by simoN)
|
||||
* reset tty after CTRL-C in bmore
|
||||
* -c option in bmore (clear before displaying)
|
||||
* -n num option in bmore (display the indicated number of lines in each
|
||||
screenful
|
||||
* -w num option in bmore (display the indicated number of bytes in each
|
||||
line)
|
||||
|
||||
|
||||
New in release 1.3.1
|
||||
====================
|
||||
|
||||
|
|
847
COPYING
847
COPYING
|
@ -1,339 +1,620 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
0. Definitions.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
1. Source Code.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
16. Limitation of Liability.
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
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 of the License, 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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
|
20
CREDITS
20
CREDITS
|
@ -9,14 +9,30 @@ Claudio Nieder <claudio@chili.symmetrix.ch> Makefile
|
|||
Nico Schmidt <Nico.Schmidt@ipk.fhg.de> r-bug fix
|
||||
Steve Waltner <swaltner@lsil.com> Mac OS X support
|
||||
Andre Wobst <Andre.Wobst@Physik.Uni-Augsburg.de> AIX fixes
|
||||
SimoN <simontdd@netzero.net> bmore: subshell support fixes
|
||||
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:
|
||||
Christian "naddy" Weisgerber <naddy@mips.rhein-neckar.de> Source RPM
|
||||
Christian Kurz <shorty@jupiter.rhein-neckar.de> Debian package
|
||||
Stijn de Bekker <stijn@debekker.org> Debian package
|
||||
Troy Engel <tengel@sonic.net> i386 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:
|
||||
Sven Guckes <guckes@math.fu-berlin.de>
|
||||
Sven Guckes <first-contact@guckes.net>
|
||||
Ben <info@leedsnet.com>
|
||||
|
|
51
Makefile.in
51
Makefile.in
|
@ -6,8 +6,8 @@
|
|||
# "autoconf" program (constructs like "@foo@" will get replaced in the
|
||||
# actual Makefile.
|
||||
#
|
||||
# Copyright (c) 1996-2000 by Gerhard Buergmann
|
||||
# Gerhard.Buergmann@altavista.net
|
||||
# Copyright (c) 1996-2019 by Gerhard Buergmann
|
||||
# gerhard@puon.at
|
||||
#
|
||||
# 1996-01-18 V 1.0.0
|
||||
# 1999-01-15 V 1.1.0
|
||||
|
@ -15,28 +15,33 @@
|
|||
# 1999-10-22 V 1.2.0
|
||||
# 2000-05-31 V 1.3.0 beta
|
||||
# 2000-10-01 V 1.3.0 final
|
||||
# 2003-07-03 V 1.3.2
|
||||
# 2014-10-01 V 1.4.0
|
||||
# 2019-01-30 V 1.4.1
|
||||
#
|
||||
###############################################
|
||||
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
bindir = $(DESTDIR)@bindir@
|
||||
mandir = $(DESTDIR)@mandir@
|
||||
datadir = $(DESTDIR)@datadir@
|
||||
bindir = $(DESTDIR)@bindir@
|
||||
mandir = $(DESTDIR)@mandir@
|
||||
libdir = $(DESTDIR)@libdir@
|
||||
helpdir = $(DESTDIR)@datadir@/bvi
|
||||
|
||||
man1dir = $(mandir)/man1
|
||||
|
||||
OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o
|
||||
HEADER = bvi.h set.h
|
||||
BMOBJ = bmore.o bm_unix.o recomp.o
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@ @CPPFLAGS@
|
||||
DEFS = @DEFS@
|
||||
LDFLAGS= @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
SHELL = /bin/sh
|
||||
OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o
|
||||
INCLUDES = bvi.h set.h
|
||||
BMOBJ = bmore.o bm_unix.o recomp.o
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@ @CPPFLAGS@
|
||||
DEFS = @DEFS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
SHELL = /bin/sh
|
||||
|
||||
|
||||
|
||||
|
@ -47,32 +52,32 @@ INSTALL_DATA = @INSTALL_DATA@
|
|||
|
||||
all: bvi bmore
|
||||
|
||||
bvi: $(OBJS)
|
||||
bvi: $(OBJS) $(HEADER)
|
||||
$(CC) $(LDFLAGS) -o bvi $(OBJS) $(LIBS)
|
||||
|
||||
bmore: $(BMOBJ)
|
||||
$(CC) $(LDFLAGS) -o bmore $(BMOBJ) $(LIBS)
|
||||
|
||||
.c.o:
|
||||
%.o: %.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) $(DEFS) -c $<
|
||||
|
||||
bmore.o: bmore.c
|
||||
$(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(datadir)/bmore.help\" -c $<
|
||||
$(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(helpdir)/bmore.help\" -c $<
|
||||
|
||||
|
||||
install: all installdirs
|
||||
@echo "Installing bvi"
|
||||
@$(INSTALL_DATA) bvi.1 bmore.1 $(man1dir)
|
||||
@$(INSTALL_PROGRAM) -s bvi $(bindir)
|
||||
@$(INSTALL_PROGRAM) -s bmore $(bindir)
|
||||
@$(INSTALL_DATA) bmore.help $(datadir)
|
||||
@$(INSTALL_PROGRAM) bvi $(bindir)
|
||||
@$(INSTALL_PROGRAM) bmore $(bindir)
|
||||
@$(INSTALL_DATA) bmore.help $(helpdir)
|
||||
@if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi
|
||||
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
|
||||
@ln $(bindir)/bvi $(bindir)/bview
|
||||
@ln $(bindir)/bvi $(bindir)/bvedit
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(datadir) $(man1dir)
|
||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(helpdir) $(man1dir)
|
||||
|
||||
uninstall:
|
||||
@echo "Uninstalling bvi"
|
||||
|
@ -80,12 +85,12 @@ uninstall:
|
|||
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
|
||||
@if [ -f $(bindir)/bvi ]; then rm $(bindir)/bvi; fi
|
||||
@if [ -f $(bindir)/bmore ]; then rm $(bindir)/bmore; fi
|
||||
@if [ -f $(datadir)/bmore.help ]; then rm $(datadir)/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)/bmore.1 ]; then rm $(man1dir)/bmore.1; fi
|
||||
|
||||
clean:
|
||||
rm -f core *.o bvi bmore a.out
|
||||
rm -f core *.o bvi bvi.exe bmore bmore.exe a.out
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.h config.log config.status
|
||||
|
|
17
README
17
README
|
@ -9,8 +9,12 @@ and is distributed under the GPL (GNU Public License).
|
|||
How to compile
|
||||
==============
|
||||
|
||||
gunzip -c bvi-1.3.1.tar.gz | tar xvf -
|
||||
cd bvi-1.3.1
|
||||
You need the curses (ncurses) library for cursor movement on your system.
|
||||
https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/
|
||||
|
||||
|
||||
gunzip -c bvi-1.4.1.src.tar.gz | tar xvf -
|
||||
cd bvi-1.4.1
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
@ -23,9 +27,12 @@ You should install and use ncurses instead. You can download it from
|
|||
ftp.gnu.org; install it and then use
|
||||
./configure --with-ncurses=/usr/local/ncurses-5.2
|
||||
|
||||
The Control-y key sequence suspends bvi and send it to the background.
|
||||
To avoid this behaviour use:
|
||||
stty dsusp undef
|
||||
|
||||
HTML documentation in subdirectory html/
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
Subscribe to the bvi mailing for support, updates and other news:
|
||||
|
||||
Send a blank email to bvi-subscribe@yahoogroups.com. You will receive a
|
||||
|
@ -33,12 +40,12 @@ Subscribe to the bvi mailing for support, updates and other news:
|
|||
subscription will be complete.
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------
|
||||
PLEASE send any bug reports (and fixes), code for new features,
|
||||
comments, questions, etc. (even flames) to:
|
||||
|
||||
Gerhard Buergmann
|
||||
Vienna, Austria
|
||||
E-mail: Gerhard.Buergmann@utanet.at
|
||||
E-mail: gerhard@puon.at
|
||||
|
||||
|
||||
|
|
|
@ -5,3 +5,7 @@
|
|||
#undef HAVE_CURSES_H
|
||||
|
||||
#undef NO_SYSERRL
|
||||
|
||||
#undef NEED_PUTC_CHAR
|
||||
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bc/bvi/BVI.DSK
BIN
bc/bvi/BVI.DSK
Binary file not shown.
BIN
bc/bvi/BVI.PRJ
BIN
bc/bvi/BVI.PRJ
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,11 +3,12 @@
|
|||
* 2000-05-10 V 1.3.0 alpha
|
||||
* 2000-07-07 V 1.3.0 final
|
||||
* 2001-12-07 V 1.3.1
|
||||
* 2003-07-03 V 1.3.2
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-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
|
||||
|
@ -81,24 +82,47 @@ char *cmd;
|
|||
{
|
||||
system(cmd);
|
||||
printf("\r");
|
||||
clrscr();
|
||||
clearscreen();
|
||||
fseek(curr_file, screen_home, SEEK_SET);
|
||||
bytepos = screen_home;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
highlight()
|
||||
{
|
||||
highvideo();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
normal()
|
||||
{
|
||||
normvideo();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
clearscreen()
|
||||
{
|
||||
clrscr();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
home()
|
||||
{
|
||||
/*
|
||||
tputs(Home, 1, putch);
|
||||
|
||||
screenlines = 0;
|
||||
*/
|
||||
gotoxy(1, 1);
|
||||
}
|
||||
|
||||
|
||||
/* force clear to end of line */
|
||||
cleartoeol()
|
||||
{
|
||||
clreol();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
vgetc()
|
||||
{
|
||||
|
@ -106,15 +130,3 @@ vgetc()
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* force clear to end of line
|
||||
*/
|
||||
cleareol()
|
||||
{
|
||||
/*
|
||||
tputs(erase_ln, 1, putch);
|
||||
*/
|
||||
clreol();
|
||||
}
|
||||
|
||||
|
||||
|
|
79
bm_unix.c
79
bm_unix.c
|
@ -1,13 +1,17 @@
|
|||
/* BM_UNIX.C - Unix specific subroutines for BMORE
|
||||
/* bm_unix.c - Unix specific subroutines for BMORE
|
||||
*
|
||||
* 2000-05-31 V 1.3.0 beta
|
||||
* 2000-10-12 V 1.3.0 final
|
||||
* 2002-02-10 V 1.3.1
|
||||
* 2003-07-04 V 1.3.2
|
||||
* 2010-06-02 V 1.3.4
|
||||
* 2013-08-22 V 1.4.0
|
||||
* 2019-10-09 V 1.4.1
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
|
@ -80,12 +84,21 @@ initterm()
|
|||
no_tty = tcgetattr(fileno(stdout), &ostate);
|
||||
if (!no_tty) {
|
||||
nstate = ostate;
|
||||
/*
|
||||
* is this really necessary??
|
||||
*
|
||||
nstate.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHONL);
|
||||
*/
|
||||
nstate.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHONL);
|
||||
nstate.c_cc[VMIN] = 1;
|
||||
nstate.c_cc[VTIME] = 0;
|
||||
tcsetattr(fileno(stdin), TCSADRAIN, &nstate);
|
||||
}
|
||||
|
||||
#ifdef DJGPP
|
||||
maxx = 80;
|
||||
maxy = 25;
|
||||
#else
|
||||
if ((term = getenv("TERM")) == 0 || tgetent(buf, term) <= 0) {
|
||||
printf("Dumb terminal\n");
|
||||
maxx = 80;
|
||||
|
@ -99,6 +112,7 @@ initterm()
|
|||
clear_sc = tgetstr("cl", &clearptr);
|
||||
rev_start = tgetstr("so", &clearptr);
|
||||
rev_end = tgetstr("se", &clearptr);
|
||||
#endif
|
||||
|
||||
no_intty = tcgetattr(fileno(stdin), &ostate);
|
||||
tcgetattr(fileno(stderr), &ostate);
|
||||
|
@ -129,12 +143,12 @@ reset_tty()
|
|||
|
||||
|
||||
void
|
||||
sig()
|
||||
sig(sig)
|
||||
int sig;
|
||||
{
|
||||
signal(SIGINT, sig);
|
||||
signal(SIGQUIT, sig);
|
||||
|
||||
got_int = TRUE;
|
||||
reset_tty();
|
||||
printf("\r\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,12 +159,16 @@ void
|
|||
doshell(cmd)
|
||||
char *cmd;
|
||||
{
|
||||
int ret;
|
||||
#ifndef DJGPP
|
||||
char *getenv();
|
||||
char *shell;
|
||||
char cline[128];
|
||||
#endif
|
||||
|
||||
printf("\n");
|
||||
|
||||
#ifndef DJGPP
|
||||
if ((shell = getenv("SHELL")) == NULL) shell = "sh";
|
||||
else if(strrchr(shell,'/')) shell=(char *)(strrchr(shell,'/')+1);
|
||||
|
||||
|
@ -161,52 +179,81 @@ doshell(cmd)
|
|||
sprintf(cline, "%s -c \"%s\"", shell, cmd);
|
||||
cmd = cline;
|
||||
}
|
||||
#endif
|
||||
|
||||
reset_tty();
|
||||
system(cmd);
|
||||
ret = system(cmd);
|
||||
set_tty();
|
||||
printf("\r");
|
||||
home();
|
||||
fseek(curr_file, screen_home, SEEK_SET);
|
||||
fseeko(curr_file, screen_home, SEEK_SET);
|
||||
bytepos = screen_home;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
highvideo()
|
||||
highlight()
|
||||
{
|
||||
#ifndef DJGPP
|
||||
if (rev_start && rev_end)
|
||||
tputs(rev_start, 1, putchr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
normvideo()
|
||||
normal()
|
||||
{
|
||||
#ifndef DJGPP
|
||||
if (rev_start && rev_end)
|
||||
tputs(rev_end, 1, putchr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
clrscr()
|
||||
clearscreen()
|
||||
{
|
||||
tputs(clear_sc, 1, putchr);
|
||||
#ifdef DJGPP
|
||||
/* if (!no_tty)
|
||||
{
|
||||
int n;
|
||||
|
||||
for (n = 0; n < maxy; n++) {
|
||||
cleartoeol();
|
||||
printf("\n");
|
||||
}
|
||||
} */
|
||||
#else
|
||||
tputs(clear_sc, 1, putchr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
home()
|
||||
{
|
||||
tputs(Home, 1, putchr);
|
||||
#ifdef DJGPP
|
||||
if (!no_tty) printf("\r");
|
||||
#else
|
||||
tputs(Home, 1, putchr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* force clear to end of line */
|
||||
void
|
||||
clreol()
|
||||
cleartoeol()
|
||||
{
|
||||
#ifdef DJGPP
|
||||
int n;
|
||||
|
||||
home();
|
||||
if (!no_tty) for (n = 1; n < maxx; n++) printf(" ");
|
||||
home();
|
||||
#else
|
||||
tputs(erase_ln, 1, putchr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
33
bmore.1
33
bmore.1
|
@ -1,10 +1,14 @@
|
|||
.TH BMORE 1 "3 Jan 2002"
|
||||
.TH BMORE 1 "30 Jan 2019"
|
||||
.SH NAME
|
||||
bmore \- browse through a binary file
|
||||
.SH SYNOPSIS
|
||||
.B bmore
|
||||
[
|
||||
.B \-adi
|
||||
.B \-acdir
|
||||
] [
|
||||
.B \-n \fIlines\fP
|
||||
] [
|
||||
.B \-w \fIcols\fP
|
||||
] [
|
||||
.B +\fIlinenumber\fP
|
||||
] [
|
||||
|
@ -76,6 +80,9 @@ except that a header is printed before each file in a series.
|
|||
ASCII mode: no hex representation of the contents. Non printable
|
||||
characters are displayed as a dot (.)
|
||||
.TP
|
||||
.B \-c
|
||||
Clear before displaying. Redrawing the screen instead of scrolling.
|
||||
.TP
|
||||
.B \-d
|
||||
Display error messages rather than ringing the terminal bell if
|
||||
an unrecognized command is used.
|
||||
|
@ -84,6 +91,18 @@ This is helpful for inexperienced users.
|
|||
.B \-i
|
||||
Ignore case for searching.
|
||||
.TP
|
||||
.B \-n \fIlines\fP
|
||||
Displays the indicated number of \fIlines\fP in each screenful,
|
||||
rather than the default (the number of lines in the terminal screen
|
||||
less two).
|
||||
.TP
|
||||
.B \-r
|
||||
Characters between 160 - 254 are displayed as "reverse video text" as used in
|
||||
some legacy systems (Atari, Commodore, Apple II, etc).
|
||||
.TP
|
||||
.B \-w \fIcols\fP
|
||||
Display number of \fIcols\fP in each line.
|
||||
.TP
|
||||
.BI + linenumber\fP
|
||||
Start up at
|
||||
.IR linenumber .
|
||||
|
@ -98,9 +117,6 @@ end with a
|
|||
.RB ` / '.
|
||||
If it does, then the trailing slash is taken as a character in the
|
||||
search pattern.
|
||||
.TP
|
||||
.br
|
||||
.ne 8
|
||||
.SH USAGE
|
||||
.SS Commands
|
||||
.LP
|
||||
|
@ -284,7 +300,6 @@ or
|
|||
.TP
|
||||
.B \&.
|
||||
Dot. Repeat the previous command.
|
||||
.TP
|
||||
.SH FILES
|
||||
.PD 0
|
||||
.TP 20
|
||||
|
@ -296,4 +311,10 @@ help file
|
|||
.PD
|
||||
.SH "SEE ALSO"
|
||||
.BR bvi (1),
|
||||
.BR more (1)
|
||||
.BR termcap (5)
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
bmore was developed by Gerhard Buergmann, Vienna, Austria
|
||||
.BR \fIgerhard@puon.at\fR
|
||||
|
||||
|
|
331
bmore.c
331
bmore.c
|
@ -5,15 +5,18 @@
|
|||
* 2000-05-31 V 1.3.0 beta
|
||||
* 2000-10-18 V 1.3.0 final
|
||||
* 2002-01-16 V 1.3.1
|
||||
* 2004-01-09 V 1.3.2
|
||||
* 2013-08-23 V 1.4.0
|
||||
* 2019-01-22 V 1.4.1
|
||||
*
|
||||
* Copyright 1990-2019 by Gerhard Buergmann
|
||||
* gerhard@puon.at
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1990-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -31,20 +34,25 @@
|
|||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
# define PRINTF cprintf
|
||||
#else
|
||||
# define PRINTF printf
|
||||
#ifndef HELPFILE
|
||||
# define HELPFILE "/usr/local/share/bmore.help"
|
||||
# ifdef DJGPP
|
||||
# define HELPFILE "/dev/env/DJDIR/lib/bmore.help"
|
||||
# else
|
||||
# define HELPFILE "/usr/local/lib/bmore.help"
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "bmore.h"
|
||||
|
||||
char *copyright = "Copyright (C) 1990-2002 by Gerhard Buergmann";
|
||||
char *copyright = "GPL (C) 1990-2019 by Gerhard Buergmann";
|
||||
|
||||
int maxx, maxy;
|
||||
int mymaxx = 0, mymaxy = 0;
|
||||
char *name = NULL;
|
||||
char sstring[MAXCMD] = ""; /* string for search */
|
||||
char estring[MAXCMD] = ""; /* string for shell escape */
|
||||
|
@ -62,11 +70,13 @@ char numarr[64]; /* string for collecting number */
|
|||
char addr_form[15];
|
||||
|
||||
int ascii_flag = 0;
|
||||
int d_flag = 0;
|
||||
int dup_print_flag = 0;
|
||||
int c_flag = 0, d_flag = 0, r_flag = 0;
|
||||
int exval = 0;
|
||||
int init_search = 0;
|
||||
char buffer1[MAXCMD], buffer2[MAXCMD];
|
||||
int out_len;
|
||||
int corr = 0, to_print;
|
||||
int corr = 0, do_header = 0, to_print;
|
||||
off_t init_byte = 0;
|
||||
off_t last_search = 0;
|
||||
off_t screen_home, filesize;
|
||||
|
@ -74,24 +84,29 @@ off_t bytepos, oldpos;
|
|||
int prompt = 1;
|
||||
char helppath[MAXCMD];
|
||||
|
||||
static char *progname;
|
||||
static char progname[10];
|
||||
static char cmdbuf[MAXCMD];
|
||||
static int cnt = 0;
|
||||
static int icnt = 0;
|
||||
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 '[^]'";
|
||||
|
||||
|
||||
/* -a ASCII mode
|
||||
* -d beginners mode
|
||||
* -c clear before displaying
|
||||
* -i ignore case
|
||||
* -n number of lines/screen
|
||||
* -r display reverse video (highest bit set)
|
||||
* -w width of screen
|
||||
*/
|
||||
void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [-adi] [+linenum | +/pattern] name1 name2 ...\n", progname);
|
||||
fprintf(stderr, "Usage: %s [-acdir] [-lines] [+linenum | +/pattern] name1 name2 ...\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -108,15 +123,14 @@ main(argc, argv)
|
|||
long count;
|
||||
int i, n = 1;
|
||||
int d_line, r_line, z_line;
|
||||
|
||||
|
||||
#ifdef __MSDOS__
|
||||
char *poi;
|
||||
|
||||
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
strcpy(helppath, argv[0]);
|
||||
poi = strrchr(helppath, '\\');
|
||||
*poi = '\0';
|
||||
strcat(helppath, "\\MORE.HLP");
|
||||
strcat(helppath, "\\BMORE.HLP");
|
||||
#else
|
||||
strncpy(helppath, HELPFILE, MAXCMD - 1);
|
||||
#endif
|
||||
|
@ -125,23 +139,48 @@ main(argc, argv)
|
|||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
||||
progname = argv[0];
|
||||
poi = strrchr(argv[0], DELIM);
|
||||
|
||||
if (poi) strncpy(progname, ++poi, 9);
|
||||
else strncpy(progname, argv[0], 9);
|
||||
strtok(progname, ".");
|
||||
|
||||
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();
|
||||
if (argv[n][1] >= '0' && argv[n][1] <= '9') {
|
||||
sscanf(&argv[n][1], "%dx%d", &mymaxy, &mymaxx);
|
||||
} else if (argv[n][1] == 'n') {
|
||||
if (argv[n+1] == NULL || argv[n+1][0] == '-') {
|
||||
usage();
|
||||
} else {
|
||||
sscanf(&argv[++n][0], "%d", &mymaxy);
|
||||
}
|
||||
} else if (argv[n][1] == 'w') {
|
||||
if (argv[n+1] == NULL || argv[n+1][0] == '-') {
|
||||
usage();
|
||||
} else {
|
||||
sscanf(&argv[++n][0], "%d", &mymaxx);
|
||||
}
|
||||
} else {
|
||||
i = 1;
|
||||
while (argv[n][i] != '\0') {
|
||||
switch (argv[n][i]) {
|
||||
case 'a': ascii_flag++;
|
||||
break;
|
||||
case 'c': c_flag++;
|
||||
break;
|
||||
case 'd': d_flag++;
|
||||
break;
|
||||
case 'i': ignore_case++;
|
||||
break;
|
||||
case 'r': r_flag++;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
n++;
|
||||
break;
|
||||
|
@ -150,11 +189,7 @@ main(argc, argv)
|
|||
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);
|
||||
}
|
||||
init_byte = strtoll(argv[n] + 1, NULL, 0);
|
||||
}
|
||||
n++;
|
||||
break;
|
||||
|
@ -166,24 +201,38 @@ main(argc, argv)
|
|||
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;
|
||||
if (mymaxy) {
|
||||
maxy = mymaxy;
|
||||
}
|
||||
z_line = maxy;
|
||||
d_line = maxy / 2;
|
||||
r_line = 1;
|
||||
|
||||
if (numfiles == 0) {
|
||||
curr_file = stdin;
|
||||
if (isatty(fileno(stdin)) != 0) {
|
||||
reset_tty();
|
||||
usage();
|
||||
}
|
||||
} else {
|
||||
file_nr = 1;
|
||||
while (open_file(name)) { /* looking for the first existing file */
|
||||
do_next(1);
|
||||
}
|
||||
if (exval) {
|
||||
/* We dont't have one! */
|
||||
reset_tty();
|
||||
exit(exval);
|
||||
} else {
|
||||
fseeko(curr_file, init_byte, SEEK_SET);
|
||||
bytepos += init_byte;
|
||||
}
|
||||
}
|
||||
screen_home = bytepos;
|
||||
|
||||
AnzAdd = 10;
|
||||
strcpy(addr_form, "%08lX ");
|
||||
|
||||
|
@ -191,24 +240,43 @@ main(argc, argv)
|
|||
out_len = ((maxx - AnzAdd - 1) / 4) * 4;
|
||||
else
|
||||
out_len = ((maxx - AnzAdd - 1) / 16) * 4;
|
||||
if (mymaxx) {
|
||||
out_len = mymaxx;
|
||||
}
|
||||
|
||||
if (init_search)
|
||||
bmsearch(init_search);
|
||||
|
||||
if (no_tty) {
|
||||
while(!printout(1));
|
||||
fclose(curr_file);
|
||||
int fileloop;
|
||||
|
||||
for (fileloop = 0; fileloop < numfiles; fileloop++) {
|
||||
while(!printout(1));
|
||||
do_next(1);
|
||||
open_file(name);
|
||||
}
|
||||
if (curr_file) fclose(curr_file);
|
||||
reset_tty();
|
||||
exit(0);
|
||||
exit(exval);
|
||||
}
|
||||
if (printout(maxy)) {
|
||||
do_next(1);
|
||||
if (!exval) {
|
||||
if (printout(maxy)) {
|
||||
do_next(1);
|
||||
}
|
||||
}
|
||||
signal(SIGINT, sig);
|
||||
signal(SIGQUIT, sig);
|
||||
/* main loop */
|
||||
do {
|
||||
to_print = 0;
|
||||
dup_print_flag = 0;
|
||||
if (prompt) {
|
||||
highvideo();
|
||||
if (prompt == 2) {
|
||||
while (open_file(name)) {
|
||||
do_next(1);
|
||||
}
|
||||
}
|
||||
highlight();
|
||||
PRINTF("--More--");
|
||||
if (prompt == 2) {
|
||||
PRINTF("(Next file: %s)", name);
|
||||
|
@ -217,13 +285,15 @@ main(argc, argv)
|
|||
}
|
||||
|
||||
if (d_flag) PRINTF("[Press space to continue, 'q' to quit]");
|
||||
normvideo();
|
||||
normal();
|
||||
fflush(stdout);
|
||||
}
|
||||
ch = vgetc();
|
||||
/*
|
||||
if (prompt == 2) {
|
||||
open_file(name);
|
||||
}
|
||||
*/
|
||||
prompt = 1;
|
||||
PRINTF("\r");
|
||||
while (ch >= '0' && ch <= '9') {
|
||||
|
@ -248,24 +318,27 @@ main(argc, argv)
|
|||
|
||||
switch (ch) {
|
||||
case ' ': /* Display next k lines of text [current screen size] */
|
||||
dup_print_flag = 1;
|
||||
if (precount > 0) to_print = precount;
|
||||
else to_print = maxy;
|
||||
break;
|
||||
case 'z': /* Display next k lines of bytes [current screen size]* */
|
||||
dup_print_flag = 1;
|
||||
if (precount > 0) z_line = precount;
|
||||
to_print = z_line;
|
||||
break;
|
||||
case '\r':
|
||||
case '\n': /* Display next k lines of text [current screen size]* */
|
||||
dup_print_flag = 1;
|
||||
if (precount > 0) r_line = precount;
|
||||
to_print = r_line;
|
||||
break;
|
||||
case 'q':
|
||||
case 'Q':
|
||||
clreol();
|
||||
cleartoeol();
|
||||
fclose(curr_file);
|
||||
reset_tty();
|
||||
exit(0);
|
||||
exit(exval);
|
||||
case ':' :
|
||||
switch (colon) {
|
||||
case 'f':
|
||||
|
@ -282,7 +355,7 @@ main(argc, argv)
|
|||
if (precount < 1) precount = 1;
|
||||
do_next(precount);
|
||||
PRINTF("\r");
|
||||
clreol();
|
||||
cleartoeol();
|
||||
PRINTF("\n...Skipping to file %s\r\n\r\n", name);
|
||||
prompt = 2;
|
||||
break;
|
||||
|
@ -290,19 +363,19 @@ main(argc, argv)
|
|||
if (precount < 1) precount = 1;
|
||||
do_next(-precount);
|
||||
PRINTF("\r");
|
||||
clreol();
|
||||
cleartoeol();
|
||||
PRINTF("\n...Skipping back to file %s\r\n\r\n", name);
|
||||
prompt = 2;
|
||||
break;
|
||||
case 'q':
|
||||
clreol();
|
||||
cleartoeol();
|
||||
fclose(curr_file);
|
||||
reset_tty();
|
||||
exit(0);
|
||||
exit(exval);
|
||||
break;
|
||||
case '!':
|
||||
if (!no_intty) {
|
||||
clreol();
|
||||
cleartoeol();
|
||||
if (rdline(colon, estring)) break;
|
||||
doshell(estring);
|
||||
PRINTF("------------------------\r\n");
|
||||
|
@ -314,7 +387,7 @@ main(argc, argv)
|
|||
break;
|
||||
case '!':
|
||||
if (!no_intty) {
|
||||
clreol();
|
||||
cleartoeol();
|
||||
if (rdline(ch, estring)) break;
|
||||
doshell(estring);
|
||||
PRINTF("------------------------\r\n");
|
||||
|
@ -329,9 +402,9 @@ main(argc, argv)
|
|||
if (no_intty) {
|
||||
bmbeep();
|
||||
} else {
|
||||
clrscr();
|
||||
clearscreen();
|
||||
to_print = maxy + 1;
|
||||
fseek(curr_file, screen_home, SEEK_SET);
|
||||
fseeko(curr_file, screen_home, SEEK_SET);
|
||||
bytepos = screen_home;
|
||||
}
|
||||
break;
|
||||
|
@ -349,7 +422,7 @@ main(argc, argv)
|
|||
}
|
||||
screen_home -= (maxy + 1) * out_len;
|
||||
if (screen_home < 0) screen_home = 0;
|
||||
fseek(curr_file, screen_home, SEEK_SET);
|
||||
fseeko(curr_file, screen_home, SEEK_SET);
|
||||
bytepos = screen_home;
|
||||
to_print = maxy + 1;
|
||||
}
|
||||
|
@ -363,7 +436,7 @@ main(argc, argv)
|
|||
count = precount;
|
||||
}
|
||||
putchar('\r');
|
||||
clreol();
|
||||
cleartoeol();
|
||||
PRINTF("\n...skipping %ld line", count);
|
||||
if (count > 1) {
|
||||
PRINTF("s\r\n\r\n");
|
||||
|
@ -371,7 +444,7 @@ main(argc, argv)
|
|||
PRINTF("\r\n\r\n");
|
||||
}
|
||||
screen_home += (count + maxy) * out_len;
|
||||
fseek(curr_file, screen_home, SEEK_SET);
|
||||
fseeko(curr_file, screen_home, SEEK_SET);
|
||||
bytepos = screen_home;
|
||||
to_print = maxy;
|
||||
break;
|
||||
|
@ -382,7 +455,7 @@ main(argc, argv)
|
|||
}
|
||||
case '/': /**** Search String ****/
|
||||
if (!repeat) {
|
||||
clreol();
|
||||
cleartoeol();
|
||||
if (rdline(ch, sstring)) break;
|
||||
}
|
||||
case 'n': /**** Search Next ****/
|
||||
|
@ -397,17 +470,17 @@ main(argc, argv)
|
|||
bmbeep();
|
||||
} else {
|
||||
bytepos = last_search;
|
||||
fseek(curr_file, bytepos, SEEK_SET);
|
||||
fseeko(curr_file, bytepos, SEEK_SET);
|
||||
screen_home = bytepos;
|
||||
to_print = maxy;
|
||||
PRINTF("\r");
|
||||
clreol();
|
||||
cleartoeol();
|
||||
PRINTF("\n\r\n***Back***\r\n\r\n");
|
||||
}
|
||||
break;
|
||||
case '=':
|
||||
prompt = 0;
|
||||
clreol();
|
||||
cleartoeol();
|
||||
PRINTF("%lX hex %lu dec", (unsigned long)bytepos,
|
||||
(unsigned long)bytepos);
|
||||
fflush(stdout);
|
||||
|
@ -426,7 +499,7 @@ main(argc, argv)
|
|||
case 'w':
|
||||
case 'v':
|
||||
if (!no_intty) {
|
||||
clreol();
|
||||
cleartoeol();
|
||||
if (ch == 'v') {
|
||||
sprintf(string, "bvi +%lu %s",
|
||||
(unsigned long)(screen_home +
|
||||
|
@ -482,7 +555,7 @@ rdline(ch, sstring)
|
|||
if (i) {
|
||||
sstring[--i] = '\0';
|
||||
PRINTF("\r%c%s", ch, sstring);
|
||||
clreol();
|
||||
cleartoeol();
|
||||
} else {
|
||||
ch1 = ESC;
|
||||
break;
|
||||
|
@ -504,7 +577,7 @@ rdline(ch, sstring)
|
|||
}
|
||||
if (ch1 == ESC) {
|
||||
putchar('\r');
|
||||
clreol();
|
||||
cleartoeol();
|
||||
return 1;
|
||||
}
|
||||
if (i) sstring[i] = '\0';
|
||||
|
@ -518,9 +591,9 @@ do_next(n)
|
|||
{
|
||||
if (numfiles) {
|
||||
if (n == 1 && file_nr == numfiles) {
|
||||
fclose(curr_file);
|
||||
if (curr_file) fclose(curr_file);
|
||||
reset_tty();
|
||||
exit(0);
|
||||
exit(exval);
|
||||
}
|
||||
if ((file_nr + n) > numfiles)
|
||||
file_nr = numfiles;
|
||||
|
@ -532,14 +605,14 @@ do_next(n)
|
|||
free(name);
|
||||
name = strdup(*(files + file_nr - 1));
|
||||
} else {
|
||||
fclose(curr_file);
|
||||
if (curr_file) fclose(curr_file);
|
||||
reset_tty();
|
||||
exit(0);
|
||||
exit(exval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
int
|
||||
open_file(name)
|
||||
char *name;
|
||||
{
|
||||
|
@ -548,19 +621,16 @@ open_file(name)
|
|||
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) fclose(curr_file);
|
||||
if (numfiles > 1) do_header = 1;
|
||||
if ((curr_file = fopen(name, "rb")) == NULL) {
|
||||
/* reset_tty(); */
|
||||
perror(name);
|
||||
exit(1);
|
||||
exval = 1;
|
||||
return 1;
|
||||
}
|
||||
exval = 0;
|
||||
bytepos = screen_home = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -572,27 +642,48 @@ putline(buf, num)
|
|||
int print_pos;
|
||||
unsigned char ch;
|
||||
|
||||
PRINTF(addr_form, bytepos);
|
||||
for (print_pos = 0; print_pos < num; print_pos++) {
|
||||
ch = buf[print_pos];
|
||||
if (!ascii_flag) {
|
||||
PRINTF(addr_form, (unsigned long)bytepos);
|
||||
|
||||
// Hex section
|
||||
if (!ascii_flag) {
|
||||
for (print_pos = 0; print_pos < num; print_pos++) {
|
||||
ch = buf[print_pos];
|
||||
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) {
|
||||
for (; print_pos < out_len; print_pos++) {
|
||||
PRINTF(" ");
|
||||
}
|
||||
++bytepos;
|
||||
*(string + print_pos) = ' ';
|
||||
PRINTF(" ");
|
||||
}
|
||||
*(string + num) = '\0';
|
||||
PRINTF("%s\r\n", string);
|
||||
|
||||
// ASCII section
|
||||
for (print_pos = 0; print_pos < num; print_pos++) {
|
||||
++bytepos;
|
||||
ch = buf[print_pos];
|
||||
if ((ch > 31) && (ch < 127)) {
|
||||
PRINTF("%c", ch);
|
||||
} else {
|
||||
if (r_flag) {
|
||||
if ((ch & 128) && ((ch > 159) && (ch < 255))) {
|
||||
if (!no_tty) highlight();
|
||||
PRINTF("%c", ch & 127);
|
||||
if (!no_tty) normal();
|
||||
} else {
|
||||
PRINTF(".");
|
||||
}
|
||||
} else {
|
||||
PRINTF(".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fill last line
|
||||
for (; print_pos < out_len; print_pos++) {
|
||||
++bytepos;
|
||||
PRINTF(" ");
|
||||
}
|
||||
if (no_tty) PRINTF("\n");
|
||||
else PRINTF("\r\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -604,6 +695,20 @@ printout(lns)
|
|||
int doub = 0;
|
||||
static int flag;
|
||||
|
||||
if (c_flag) {
|
||||
clearscreen();
|
||||
}
|
||||
if (do_header) {
|
||||
if (no_tty) {
|
||||
PRINTF("::::::::::::::\n%s\n::::::::::::::\n", name);
|
||||
} else {
|
||||
PRINTF("\r");
|
||||
cleartoeol();
|
||||
PRINTF("::::::::::::::\r\n%s\r\n::::::::::::::\r\n", name);
|
||||
}
|
||||
do_header = 0;
|
||||
corr = 2;
|
||||
}
|
||||
if (corr && (lns > maxy - 2)) lns -= corr;
|
||||
corr = 0;
|
||||
do {
|
||||
|
@ -612,14 +717,14 @@ printout(lns)
|
|||
buffer1[num] = c;
|
||||
}
|
||||
if (!num) return 1;
|
||||
if (memcmp(buffer1, buffer2, num) || !bytepos ) {
|
||||
if (memcmp(buffer1, buffer2, num) || !bytepos || !dup_print_flag) {
|
||||
memcpy(buffer2, buffer1, num);
|
||||
putline(buffer2, num);
|
||||
if (!no_tty) flag = TRUE;
|
||||
lns--;
|
||||
} else {
|
||||
if (flag) {
|
||||
clreol();
|
||||
cleartoeol();
|
||||
PRINTF("*\r\n");
|
||||
lns--;
|
||||
} else {
|
||||
|
@ -633,6 +738,7 @@ printout(lns)
|
|||
if (screen_home < 0) screen_home = 0;
|
||||
return 0;
|
||||
}
|
||||
dup_print_flag = 1;
|
||||
} while(num);
|
||||
return 1;
|
||||
}
|
||||
|
@ -811,16 +917,19 @@ bmsearch(ch)
|
|||
return;
|
||||
}
|
||||
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 (hex_comp(search_pat, sstring)) return;
|
||||
/* if (hex_comp(search_pat, sstring)) return; */
|
||||
if (hex_comp(bmore_search_pat, sstring)) return;
|
||||
}
|
||||
oldpos = bytepos;
|
||||
last_search = screen_home;
|
||||
if (precount < 1) precount = 1;
|
||||
while (precount--) {
|
||||
while ((i = bmregexec(search_pat)) == 0);
|
||||
/* while ((i = bmregexec(search_pat)) == 0); */
|
||||
while ((i = bmregexec(bmore_search_pat)) == 0);
|
||||
if (i == 1) {
|
||||
screen_home = bytepos;
|
||||
to_print = maxy;
|
||||
|
@ -835,7 +944,7 @@ emsg(string);
|
|||
*/
|
||||
emsg("Pattern not found");
|
||||
bytepos = oldpos;
|
||||
fseek(curr_file, bytepos, SEEK_SET);
|
||||
fseeko(curr_file, bytepos, SEEK_SET);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -855,10 +964,10 @@ emsg(s)
|
|||
char *s;
|
||||
{
|
||||
putchar('\r');
|
||||
clreol();
|
||||
highvideo();
|
||||
PRINTF(s);
|
||||
normvideo();
|
||||
cleartoeol();
|
||||
highlight();
|
||||
PRINTF("%s", s);
|
||||
normal();
|
||||
fflush(stdout);
|
||||
prompt = 0;
|
||||
}
|
||||
|
|
41
bmore.h
41
bmore.h
|
@ -8,15 +8,18 @@
|
|||
* 2000-05-31 V 1.3.0 beta
|
||||
* 2000-10-04 V 1.3.0 final
|
||||
* 2002-01-16 V 1.3.1
|
||||
* 2003-02-20 V 1.3.2
|
||||
* 2010-03-28 V 1.3.4
|
||||
* 2019-01-22 V 1.4.1
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -36,7 +39,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
# include "patchlev.h"
|
||||
# include "dosconf.h"
|
||||
# include <alloc.h>
|
||||
|
@ -46,15 +49,23 @@
|
|||
# include "patchlevel.h"
|
||||
# include "config.h"
|
||||
# include <unistd.h>
|
||||
#if HAVE_NCURSES_H
|
||||
# if HAVE_NCURSES_H
|
||||
# include <ncurses.h>
|
||||
# include <ncurses/term.h>
|
||||
#else
|
||||
# else
|
||||
# include <curses.h>
|
||||
# endif
|
||||
# if HAVE_TERM_H
|
||||
# include <term.h>
|
||||
#endif
|
||||
# else
|
||||
# if HAVE_NCURSES_TERM_H
|
||||
# include <ncurses/term.h>
|
||||
# else
|
||||
# include <term.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* defines for filemode */
|
||||
#define ERROR -1
|
||||
#define REGULAR 0
|
||||
|
@ -89,7 +100,7 @@
|
|||
# define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
# define ANSI
|
||||
# define PTR char huge *
|
||||
# define off_t long
|
||||
|
@ -123,13 +134,13 @@ extern int no_tty, no_intty;
|
|||
|
||||
#ifdef ANSI
|
||||
void initterm(void), set_tty(void), reset_tty(void);
|
||||
void clreol(void), clrscr(void), highvideo(void), normvideo(void);
|
||||
void bmbeep(void), home(void), sig(void);
|
||||
void cleartoeol(void), clearscreen(void), highlight(void);
|
||||
void normal(void), bmbeep(void), home(void), sig(void);
|
||||
void doshell(char *), emsg(char *);
|
||||
void do_next(int);
|
||||
void open_file(char *);
|
||||
void bmsearch(int);
|
||||
void pushback(int, char *);
|
||||
int open_file(void);
|
||||
int printout(int), rdline(int, char *);
|
||||
int nextchar(void), vgetc(void);
|
||||
int sbracket(int, char *, int);
|
||||
|
@ -138,13 +149,13 @@ extern int no_tty, no_intty;
|
|||
void putline(char *, int);
|
||||
#else
|
||||
void initterm(), set_tty(), reset_tty();
|
||||
void clreol(), clrscr(), highvideo(), normvideo();
|
||||
void bmbeep(), home(), sig();
|
||||
void cleartoeol(), clearscreen(), highlight();
|
||||
void normal(), bmbeep(), home(), sig();
|
||||
void doshell(), emsg();
|
||||
void do_next();
|
||||
void open_file();
|
||||
void bmsearch();
|
||||
void pushback();
|
||||
int open_file();
|
||||
int printout(), rdline();
|
||||
int nextchar(), vgetc();
|
||||
int sbracket();
|
||||
|
|
198
bmore.man
198
bmore.man
|
@ -1,198 +0,0 @@
|
|||
|
||||
|
||||
|
||||
BMORE(1) BMORE(1)
|
||||
|
||||
|
||||
NNAAMMEE
|
||||
bmore - browse through a binary file
|
||||
|
||||
SSYYNNOOPPSSIISS
|
||||
bbmmoorree [ --aaddii ] [ ++_l_i_n_e_n_u_m_b_e_r ] [ ++//_A_S_C_I_I_-_p_a_t_t_e_r_n ] [
|
||||
++\\_H_e_x_-_p_a_t_t_e_r_n ] [ _f_i_l_e_n_a_m_e ... ]
|
||||
|
||||
|
||||
DDEESSCCRRIIPPTTIIOONN
|
||||
mmoorree 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 ----MMoorree---- at
|
||||
the bottom of the screen. bbmmoorree provides a two-line over
|
||||
lap between screens for continuity. If bbmmoorree is reading
|
||||
from a file rather than a pipe, the percentage of charac
|
||||
ters displayed so far is also shown.
|
||||
|
||||
bbmmoorree 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).
|
||||
|
||||
bbmmoorree sets the terminal to _n_o_e_c_h_o 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, mmoorree acts just
|
||||
like ccaatt(1V), except that a header is printed before each
|
||||
file in a series.
|
||||
|
||||
OOPPTTIIOONNSS
|
||||
--aa ASCII mode: no hex representation of the contents.
|
||||
Non printable characters are displayed as a dot (.)
|
||||
|
||||
--dd Display error messages rather than ringing the ter
|
||||
minal bell if an unrecognized command is used.
|
||||
This is helpful for inexperienced users.
|
||||
|
||||
--ii Ignore case for searching.
|
||||
|
||||
++_l_i_n_e_n_u_m_b_e_r
|
||||
Start up at _l_i_n_e_n_u_m_b_e_r.
|
||||
|
||||
++//_A_S_C_I_I_-_p_a_t_t_e_r_n
|
||||
Start up at the line containing the regular
|
||||
|
||||
|
||||
|
||||
13 June 2000 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BMORE(1) BMORE(1)
|
||||
|
||||
|
||||
expression _p_a_t_t_e_r_n. Note: unlike editors, this
|
||||
construct should _n_o_t end with a `//'. If it does,
|
||||
then the trailing slash is taken as a character in
|
||||
the search pattern.
|
||||
|
||||
|
||||
UUSSAAGGEE
|
||||
|
||||
CCoommmmaannddss
|
||||
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 `----MMoorree----((_x_x%%))' message.
|
||||
|
||||
In the following commands, _i is a numerical argument (11 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^^DD (CTRL-D) Display (scroll down) 11 more lines. _i
|
||||
is given, the scroll size is set to _i.
|
||||
|
||||
_id Same as ^^DD.
|
||||
|
||||
_izz Same as SPACE, except that _i, if present,
|
||||
becomes the new default number of lines per
|
||||
screenful.
|
||||
|
||||
_iss Skip _i lines and then print a screenful.
|
||||
|
||||
_iff Skip _i screenfuls and then print a screenful.
|
||||
|
||||
_i^^BB (CTRL-B) Skip back _i screenfuls and then print a
|
||||
screenful.
|
||||
|
||||
_b Same as ^^BB (CTRL-D).
|
||||
|
||||
qq
|
||||
QQ Exit from mmoorree.
|
||||
|
||||
== Display the current line number.
|
||||
|
||||
vv Drop into the bbvvii(1) editor at the current off
|
||||
set of the current file.
|
||||
|
||||
ww Drop into the bbvvii(1) editor at the current off
|
||||
set of the current file. Only the portion of the
|
||||
file displayed on the screen will be loaded.
|
||||
|
||||
|
||||
|
||||
13 June 2000 2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BMORE(1) BMORE(1)
|
||||
|
||||
|
||||
hh Help. Give a description of all the mmoorree com
|
||||
mands.
|
||||
|
||||
_i//_p_a_t_t_e_r_n Search for the _ith occurrence of the regular
|
||||
expression _p_a_t_t_e_r_n. Display the screenful
|
||||
starting at the file position that contains the
|
||||
_ith match for the regular expression _A_S_C_I_I_-_p_a_t_
|
||||
_t_e_r_n, or the end of a pipe, whichever comes
|
||||
first. If bbmmoorree 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.
|
||||
|
||||
!!_c_o_m_m_a_n_d Invoke a shell to execute _c_o_m_m_a_n_d. The charac
|
||||
ters %% and !!, when used within _c_o_m_m_a_n_d 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::nn 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::pp 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 mmoorree is positioned
|
||||
within a file, go to the beginning of the file.
|
||||
If mmoorree is reading from a pipe, mmoorree simply
|
||||
rings the terminal bell.
|
||||
|
||||
::ff Display the current filename and offset number.
|
||||
|
||||
::qq
|
||||
::QQ Exit from bbmmoorree (same as qq or QQ ))..
|
||||
|
||||
.. Dot. Repeat the previous command.
|
||||
|
||||
|
||||
FFIILLEESS
|
||||
//eettcc//tteerrmmccaapp terminal data base
|
||||
//uussrr//llooccaall//sshhaarree//bbmmoorree..hheellpp
|
||||
help file
|
||||
|
||||
SSEEEE AALLSSOO
|
||||
bbvvii(1), tteerrmmccaapp(5)
|
||||
|
||||
|
||||
|
||||
3 Jan 2002 3
|
||||
|
||||
|
42
bvi.1
42
bvi.1
|
@ -93,7 +93,7 @@
|
|||
.nr % 0
|
||||
.rr F
|
||||
.\}
|
||||
.TH BVI 1 "BVI Version 1.3.1" "3/Jan/2002" "User Commands"
|
||||
.TH BVI 1 "BVI Version 1.4.1" "30/Jan/2019" "User Commands"
|
||||
.IX Title "BVI 1"
|
||||
.UC
|
||||
.IX Name "bvi, bview - visual display editor for binary files"
|
||||
|
@ -194,11 +194,11 @@
|
|||
bvi, bview \- visual editor for binary files
|
||||
.SH "VERSION"
|
||||
.IX Header "VERSION"
|
||||
bvi-1.3.1
|
||||
bvi-1.4.1
|
||||
.SH "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...
|
||||
\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...
|
||||
\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\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR...
|
||||
.SH "OPTIONS"
|
||||
.IX Header "OPTIONS"
|
||||
.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,
|
||||
preventing accidental overwriting with a write command.
|
||||
|
||||
.Ip "\fB\-b\fR \fIbegin\fR" 4
|
||||
.IX Item "\fB\-b\fR \fIbegin\fR"
|
||||
.Ip "\fB\-s\fR \fIskip\fR" 4
|
||||
.IX Item "\fB\-s\fR \fIskip\fR"
|
||||
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
|
||||
.IX Item "\fB\-e\fR \fIend\fR"
|
||||
causes bvi to load a file not till end but till address \fIend\fR.
|
||||
|
||||
.Ip "\fB\-s\fR \fIsize\fR" 4
|
||||
.IX Item "\fB\-s\fR \fIsize\fR"
|
||||
causes bvi not to load the complete file but only \fIsize\fR bytes.
|
||||
.Ip "\fB\-n\fR \fIlength\fR" 4
|
||||
.IX Item "\fB\-n\fR \fIlength\fR"
|
||||
causes bvi not to load the complete file but only \fIlength\fR bytes.
|
||||
|
||||
.Ip "\fB\-c\fR \fIcmd\fR" 4
|
||||
.IX Item "\fB\-c\fR \fIcmd\fR"
|
||||
|
@ -242,9 +248,10 @@ can use this option to make several global changes in a binary file.
|
|||
Bvi stands for \*(L"Binary VIsual editor\*(R".
|
||||
Bvi is a screen oriented editor for binary files;
|
||||
its command set is based on that of the \fIvi\fR\|(1) text editor.
|
||||
As a binary editor does not have the concept of \*(L"lines\*(R"
|
||||
there are differences from Vi commands wherever the latter are
|
||||
line orientate.
|
||||
As bvi is a binary editor, it does not have the concept
|
||||
of \*(L"lines\*(R". All end-of-lines (EOLs) are simply bytes.
|
||||
Therefore bvi's commands are different from vi's
|
||||
commands for all line-oriented commands (see below).
|
||||
.SH "COMPARISON"
|
||||
.IX Header "COMPARISON"
|
||||
The main differences between Vi and Bvi are:
|
||||
|
@ -579,6 +586,8 @@ the file. If you use ASCII mode you can use the special characters
|
|||
\& memmove nomm enables insert and delete commands
|
||||
\& offset of=0 adds an offset to the diplayed addresses
|
||||
\& readonly noro If set, write fails unless you use ! after command
|
||||
\& reverse nore display otherwise-printable characters with their
|
||||
\& high bit set as reverse video
|
||||
\& scroll sc=1/2 window
|
||||
\& Number of lines scrolled by ^U and ^D
|
||||
\& showmode mo Displays statusline on bottom of the screen
|
||||
|
@ -594,21 +603,22 @@ the file. If you use ASCII mode you can use the special characters
|
|||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
bvi was developed by Gerhard Buergmann, Vienna, Austria
|
||||
\fIGerhard.Buergmann@altavista.net\fR
|
||||
\fIgerhard@puon.at\fR
|
||||
.SH "WWW"
|
||||
.IX Header "WWW"
|
||||
Bvi\ Homepage:\ \ http://bvi.sourceforge.net/
|
||||
Vi\ Pages:\ \ \ \ \ \ http://www.math.fu-berlin.de/~guckes/vi/
|
||||
Vi\ Pages:\ \ \ \ \ \ http://www.guckes.net/vi/clones.php3
|
||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (all\ about\ Vi\ and\ its\ clones)
|
||||
.SH "FILES"
|
||||
.IX Header "FILES"
|
||||
\fI\ $HOME/.bvirc\fR\ \ \ \ \ \ \ \ \ \ editor\ startup\ file
|
||||
.BR
|
||||
\fI\ ./.bvirc\fR\ \ \ \ \ \ \ \ \ \ \ \ \ \ editor\ startup\ file
|
||||
.SH "BUGS"
|
||||
.IX Header "BUGS"
|
||||
Bvi does not update the screen when the terminal changes its size.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\fIvi\fR\|(1), \fIstrings\fR\|(1), \fIascii\fR\|(5)
|
||||
\fIbmore\fR\|(1), \fIvi\fR\|(1), \fIstrings\fR\|(1), \fIascii\fR\|(5)
|
||||
|
||||
.rn }` ''
|
||||
|
|
185
bvi.c
185
bvi.c
|
@ -8,15 +8,20 @@
|
|||
* 2000-05-10 V 1.3.0 alpha
|
||||
* 2000-10-24 V 1.3.0 final
|
||||
* 2002-01-03 V 1.3.1
|
||||
* 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
|
||||
* 2019-10-12 V 1.4.1
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -37,13 +42,13 @@
|
|||
#endif
|
||||
|
||||
|
||||
char *copyright = "Copyright (C) 1996-2002 by Gerhard Buergmann";
|
||||
char *copyright = "(C) GPL 1996-2019 by Gerhard Buergmann";
|
||||
|
||||
jmp_buf env; /* context for `longjmp' function */
|
||||
|
||||
int loc;
|
||||
int maxx, maxy, x, xx, y;
|
||||
int screen, status;
|
||||
int screen, status, statsize;
|
||||
off_t size;
|
||||
PTR mem = NULL;
|
||||
PTR curpos;
|
||||
|
@ -52,15 +57,19 @@ PTR pagepos;
|
|||
PTR spos;
|
||||
char *name = NULL;
|
||||
char *shell;
|
||||
char string[MAXCMD];
|
||||
char cmdstr[MAXCMD + 1] = "";
|
||||
char string[MAXCMD+1];
|
||||
char cmdstr[MAXCMD+1] = "";
|
||||
FILE *Ausgabe_Datei;
|
||||
int edits = 0;
|
||||
int AnzAdd, Anzahl, Anzahl3;
|
||||
off_t filesize, memsize, undosize;
|
||||
long precount = -1; /* number preceding command */
|
||||
|
||||
|
||||
long precount = -1;
|
||||
|
||||
int block_flag = 0;
|
||||
|
||||
|
||||
off_t block_begin, block_end, block_size;
|
||||
|
||||
|
||||
|
@ -69,7 +78,7 @@ int numfiles; /* number of input files */
|
|||
int curfile; /* number of the current file */
|
||||
|
||||
int arrnum = 0;
|
||||
char numarr[64]; /* string for collecting number */
|
||||
char numarr[MAXCMD+1]; /* string for collecting number */
|
||||
char rep_buf[BUFFER];
|
||||
|
||||
PTR current;
|
||||
|
@ -80,6 +89,7 @@ off_t undo_count;
|
|||
off_t yanked = 0L;
|
||||
char *yank_buf = NULL;
|
||||
char *undo_buf = NULL;
|
||||
char *fname_buf = NULL;
|
||||
PTR markbuf[26];
|
||||
|
||||
char addr_form[15];
|
||||
|
@ -87,17 +97,19 @@ char addr_form[15];
|
|||
char *nobytes = "No bytes@in the buffer";
|
||||
|
||||
static char progname[8];
|
||||
static char line[MAXCMD];
|
||||
static char line[MAXCMD+1];
|
||||
static int mark;
|
||||
static int scrolly;
|
||||
static int wrstat = 1;
|
||||
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -115,6 +127,8 @@ main(argc, argv)
|
|||
off_t inaddr;
|
||||
char *poi;
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
@ -149,26 +163,27 @@ main(argc, argv)
|
|||
} else {
|
||||
script = ++n;
|
||||
}
|
||||
} else if (argv[n][1] == 'b') {
|
||||
|
||||
} else if (argv[n][1] == 's') {
|
||||
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
||||
usage();
|
||||
} else {
|
||||
block_begin = calc_size(argv[++n]);
|
||||
block_flag |= 1;
|
||||
block_flag |= BLOCK_BEGIN;
|
||||
}
|
||||
} else if (argv[n][1] == 'e') {
|
||||
if (argv[n + 1] == NULL || argv[n + 1][0] == '-') {
|
||||
usage();
|
||||
} else {
|
||||
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] == '-') {
|
||||
usage();
|
||||
} else {
|
||||
block_size = calc_size(argv[++n]);
|
||||
block_flag |= 4;
|
||||
block_flag |= BLOCK_LEN;
|
||||
}
|
||||
} else if (argv[n][1] == 'w') {
|
||||
if (argv[n][2] == '\0') {
|
||||
|
@ -196,28 +211,39 @@ main(argc, argv)
|
|||
break;
|
||||
}
|
||||
}
|
||||
/* TODO default block_size - end of file up to max 64 KB with warning */
|
||||
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;
|
||||
case 1|2:
|
||||
block_size = block_end - block_begin + 1;
|
||||
break;
|
||||
case 4:
|
||||
case BLOCK_BEGIN|BLOCK_END:
|
||||
block_size = block_end - block_begin + 1;
|
||||
break;
|
||||
case BLOCK_LEN:
|
||||
block_begin = 0;
|
||||
case 1|4:
|
||||
block_end = block_begin + block_size - 1;
|
||||
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;
|
||||
break;
|
||||
case 1|2|4:
|
||||
case BLOCK_BEGIN|BLOCK_END|BLOCK_LEN:
|
||||
if (block_end - block_begin != block_size + 1) {
|
||||
fprintf(stderr, "Ambigous block data\n");
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (block_flag && !numfiles) {
|
||||
fprintf(stderr, "Cannot read a range of a nonexisting file\n");
|
||||
exit(1);
|
||||
|
@ -231,8 +257,7 @@ main(argc, argv)
|
|||
|
||||
maxy = LINES;
|
||||
if (params[P_LI].flags & P_CHANGED) maxy = P(P_LI);
|
||||
scrolly = maxy / 2;
|
||||
P(P_SS) = scrolly;
|
||||
P(P_SS) = maxy / 2;
|
||||
P(P_LI) = maxy;
|
||||
maxy--;
|
||||
keypad(stdscr, TRUE);
|
||||
|
@ -241,18 +266,25 @@ main(argc, argv)
|
|||
cbreak();
|
||||
noecho();
|
||||
|
||||
/*
|
||||
AnzAdd = 8;
|
||||
strcpy(addr_form, "%06lX ");
|
||||
*/
|
||||
AnzAdd = 10;
|
||||
strcpy(addr_form, "%08lX ");
|
||||
/* address column width */
|
||||
/* default is 8 + 2 blanks */
|
||||
/* if block_begin has 8 hex digits or more */
|
||||
/* reserve 1 hex digit more than required */
|
||||
char tmp[sizeof(block_begin) * 2 + 3];
|
||||
AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1;
|
||||
if (AnzAdd < 8)
|
||||
AnzAdd = 8;
|
||||
if (AnzAdd > sizeof(block_begin) * 2)
|
||||
AnzAdd = sizeof(block_begin) * 2;
|
||||
sprintf(addr_form, "%%0%dllX ", AnzAdd);
|
||||
AnzAdd = sprintf(tmp, addr_form, block_begin);
|
||||
|
||||
Anzahl = ((COLS - AnzAdd - 1) / 16) * 4;
|
||||
P(P_CM) = Anzahl;
|
||||
maxx = Anzahl * 4 + AnzAdd + 1;
|
||||
Anzahl3 = Anzahl * 3;
|
||||
status = Anzahl3 + Anzahl - 17;
|
||||
statsize = 35;
|
||||
status = Anzahl3 + Anzahl - statsize;
|
||||
screen = Anzahl * (maxy - 1);
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
|
@ -268,6 +300,7 @@ main(argc, argv)
|
|||
read_rc(argv[script]);
|
||||
if (*cmdstr != '\0')
|
||||
docmdline(cmdstr);
|
||||
msg(fname_buf);
|
||||
|
||||
/* main loop */
|
||||
do {
|
||||
|
@ -278,11 +311,11 @@ main(argc, argv)
|
|||
setcur();
|
||||
ch = vgetc();
|
||||
while (ch >= '0' && ch <= '9') {
|
||||
numarr[arrnum++] = ch;
|
||||
if (arrnum < MAXCMD) numarr[arrnum++] = ch;
|
||||
ch = vgetc();
|
||||
}
|
||||
numarr[arrnum] = '\0';
|
||||
if (arrnum != 0) precount = strtol(numarr, (char **)NULL, 10);
|
||||
if (arrnum != 0) precount = strtoll(numarr, (char **)NULL, 10);
|
||||
else precount = -1;
|
||||
lflag = arrnum = 0;
|
||||
|
||||
|
@ -302,7 +335,7 @@ main(argc, argv)
|
|||
break;
|
||||
case '~': if (precount < 1) precount = 1;
|
||||
sprintf(rep_buf, "%ld~", precount);
|
||||
do_tilde(precount);
|
||||
do_tilde((off_t)precount);
|
||||
lflag++;
|
||||
break;
|
||||
case KEY_HOME:
|
||||
|
@ -331,6 +364,7 @@ main(argc, argv)
|
|||
else x = AnzAdd + Anzahl3;
|
||||
break;
|
||||
case BVICTRL('H'):
|
||||
case ASCII_DEL:
|
||||
case KEY_BACKSPACE:
|
||||
case KEY_LEFT:
|
||||
case 'h': do {
|
||||
|
@ -397,12 +431,12 @@ main(argc, argv)
|
|||
repaint();
|
||||
break;
|
||||
case BVICTRL('D'):
|
||||
if (precount > 1) scrolly = precount;
|
||||
scrolldown(scrolly);
|
||||
if (precount > 1) P(P_SS) = precount;
|
||||
scrolldown(P(P_SS));
|
||||
break;
|
||||
case BVICTRL('U'):
|
||||
if (precount > 1) scrolly = precount;
|
||||
scrollup(scrolly);
|
||||
if (precount > 1) P(P_SS) = precount;
|
||||
scrollup(P(P_SS));
|
||||
break;
|
||||
case BVICTRL('E'):
|
||||
if (y > 0) y--;
|
||||
|
@ -428,7 +462,7 @@ main(argc, argv)
|
|||
new_screen();
|
||||
break;
|
||||
case BVICTRL('Y'):
|
||||
if (y < maxy) y++;
|
||||
if (y < maxy - 1) y++;
|
||||
scrollup(1);
|
||||
break;
|
||||
case 'A': smsg("APPEND MODE");
|
||||
|
@ -466,17 +500,19 @@ main(argc, argv)
|
|||
}
|
||||
break;
|
||||
case 'g': last_motion = current;
|
||||
msg("Goto Hex Address: ");
|
||||
clearstr();
|
||||
outmsg("Goto Hex Address:");
|
||||
refresh();
|
||||
getcmdstr(cmdstr, 19);
|
||||
getcmdstr(cmdstr, 18);
|
||||
clearstr();
|
||||
if (cmdstr[0] == '^') {
|
||||
inaddr = P(P_OF);
|
||||
} else if (cmdstr[0] == '$') {
|
||||
inaddr = filesize + P(P_OF) - 1L;
|
||||
} else {
|
||||
long ltmp;
|
||||
sscanf(cmdstr, "%lx", <mp);
|
||||
inaddr = (off_t)ltmp;
|
||||
off_t ltmp;
|
||||
sscanf(cmdstr, "%llx", (long long unsigned *)<mp);
|
||||
inaddr = ltmp;
|
||||
}
|
||||
if (inaddr < P(P_OF)) break;
|
||||
inaddr -= P(P_OF);
|
||||
|
@ -484,8 +520,7 @@ main(argc, argv)
|
|||
setpage(mem + inaddr);
|
||||
} else {
|
||||
if (filesize == 0L) break;
|
||||
sprintf(string, "Max. address of current file : %06lX",
|
||||
(long)(filesize - 1L + P(P_OF)));
|
||||
sprintf(string, "Max. address of current file : %06llX", (long long unsigned)(filesize - 1L + P(P_OF)));
|
||||
emsg(string);
|
||||
}
|
||||
break;
|
||||
|
@ -497,11 +532,23 @@ main(argc, argv)
|
|||
refresh();
|
||||
if (getcmdstr(line, 1)) break;
|
||||
last_motion = current;
|
||||
hl_spat = P(P_HL);
|
||||
searching(ch, line, current, maxpos - 1, P(P_WS));
|
||||
if (hl_spat) {
|
||||
repaint();
|
||||
}
|
||||
break;
|
||||
case ESC: /* un-highlight */
|
||||
hl_spat = FALSE;
|
||||
repaint();
|
||||
break;
|
||||
case 'n': /**** Search Next ****/
|
||||
case 'N': last_motion = current;
|
||||
hl_spat = P(P_HL);
|
||||
searching(ch, "", current, maxpos - 1, P(P_WS));
|
||||
if (hl_spat) {
|
||||
repaint();
|
||||
}
|
||||
break;
|
||||
case 'm': do_mark(vgetc(), current);
|
||||
break;
|
||||
|
@ -536,7 +583,7 @@ main(argc, argv)
|
|||
if ((undo_count = alloc_buf(yanked, &undo_buf)) == 0L)
|
||||
break;
|
||||
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
|
||||
memcpy(undo_buf, yank_buf, yanked);
|
||||
*/
|
||||
|
@ -552,20 +599,25 @@ main(argc, argv)
|
|||
case 'u': do_undo();
|
||||
break;
|
||||
case 'W':
|
||||
case 'w': loc = ASCII;
|
||||
case 'w': // loc = ASCII;
|
||||
setpage(wordsearch(current, ch));
|
||||
break;
|
||||
case 'y': count = range(ch);
|
||||
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;
|
||||
}
|
||||
memcpy(yank_buf, current, yanked);
|
||||
} else if (count < 0) {
|
||||
if ((yanked = alloc_buf(-count, &yank_buf)) == 0L) {
|
||||
if ((yanked = alloc_buf(-(off_t)count, &yank_buf)) == 0L) {
|
||||
break;
|
||||
}
|
||||
memcpy(yank_buf, current + count, yanked);
|
||||
memcpy(yank_buf, current, yanked);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -629,11 +681,6 @@ main(argc, argv)
|
|||
precount = 1;
|
||||
undo_count = edit('i');
|
||||
lflag++;
|
||||
/*
|
||||
} else if (count) {
|
||||
sprintf(string, "%ld bytes deleted", labs(count));
|
||||
msg(string);
|
||||
*/
|
||||
}
|
||||
break;
|
||||
case 'x':
|
||||
|
@ -682,13 +729,20 @@ off_t
|
|||
calc_size(arg)
|
||||
char *arg;
|
||||
{
|
||||
long val;
|
||||
off_t val;
|
||||
extern int errno;
|
||||
char *poi;
|
||||
|
||||
if (*arg == '0') {
|
||||
val = strtol(arg, &poi, 16);
|
||||
} else {
|
||||
val = strtol(arg, &poi, 10);
|
||||
errno = 0;
|
||||
val = strtoll(arg, &poi, 0);
|
||||
if (val < 0) {
|
||||
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) {
|
||||
case 'k':
|
||||
|
@ -697,6 +751,9 @@ calc_size(arg)
|
|||
case 'm':
|
||||
case 'M': val *= 1048576;
|
||||
break;
|
||||
case 'g':
|
||||
case 'G': val *= 1024*1024*1024LL;
|
||||
break;
|
||||
case '\0': break;
|
||||
default: usage();
|
||||
}
|
||||
|
@ -722,7 +779,7 @@ trunc_cur()
|
|||
|
||||
int
|
||||
do_append(count, buf)
|
||||
int count;
|
||||
off_t count;
|
||||
char *buf;
|
||||
{
|
||||
if (filesize + count > memsize) {
|
||||
|
|
42
bvi.h
42
bvi.h
|
@ -8,15 +8,19 @@
|
|||
* 2000-05-10 V 1.3.0 alpha
|
||||
* 2000-10-24 V 1.3.0 final
|
||||
* 2001-10-29 V 1.3.1
|
||||
* 2003-07-04 V 1.3.2
|
||||
* 2010-08-04 V 1.3.4
|
||||
* 2014-10-01 V 1.4.0
|
||||
* 2019-01-28 V 1.4.1
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2001 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -36,7 +40,9 @@
|
|||
#include <sys/stat.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#define JOEHTG
|
||||
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
# include "patchlev.h"
|
||||
# include "dosconf.h"
|
||||
# include "doscur.h"
|
||||
|
@ -96,7 +102,8 @@
|
|||
#define BS 8
|
||||
#define ESC 27
|
||||
#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)
|
||||
|
||||
|
@ -109,7 +116,7 @@
|
|||
# define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
# define ANSI
|
||||
# define PTR char huge *
|
||||
# define off_t long
|
||||
|
@ -128,6 +135,12 @@
|
|||
|
||||
#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
|
||||
extern FILE *debug_fp;
|
||||
#endif
|
||||
|
@ -138,6 +151,8 @@
|
|||
|
||||
extern char *version;
|
||||
extern char addr_form[];
|
||||
extern char search_pat[];
|
||||
extern long hl_spat;
|
||||
extern char pattern[];
|
||||
extern char rep_buf[];
|
||||
extern int maxx, maxy, x, y;
|
||||
|
@ -147,7 +162,7 @@ extern int AnzAdd;
|
|||
extern int Anzahl, Anzahl3;
|
||||
extern int addr_flag;
|
||||
extern int ignore_case, magic;
|
||||
extern int screen, status;
|
||||
extern int screen, status, statsize;
|
||||
extern PTR mem;
|
||||
extern PTR maxpos;
|
||||
extern PTR pagepos;
|
||||
|
@ -185,7 +200,7 @@ extern off_t block_begin, block_end, block_size;
|
|||
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
|
||||
#endif
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
void d_memcpy(PTR, PTR, off_t);
|
||||
void d_memmove(PTR, PTR, off_t);
|
||||
#endif
|
||||
|
@ -203,16 +218,18 @@ extern off_t block_begin, block_end, block_size;
|
|||
int bregexec(PTR, char *);
|
||||
int chk_comm(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 doset(char *);
|
||||
int do_substitution(int, char *, PTR, PTR);
|
||||
int hexchar(void);
|
||||
int outmsg(char *);
|
||||
int save_chk(char *, char *, char *, int);
|
||||
PTR searching(int, char *, PTR, PTR, int);
|
||||
PTR wordsearch(PTR, char);
|
||||
PTR backsearch(PTR, char);
|
||||
PTR fsearch(PTR, PTR, char *);
|
||||
PTR fsearch_end(PTR, PTR, char *, PTR *);
|
||||
PTR rsearch(PTR, PTR, char *);
|
||||
PTR end_word(PTR);
|
||||
PTR calc_addr(char **, PTR);
|
||||
|
@ -252,11 +269,14 @@ extern off_t block_begin, block_end, block_size;
|
|||
int do_substitution();
|
||||
int hexchar();
|
||||
int outmsg();
|
||||
int save_chk();
|
||||
PTR searching();
|
||||
PTR wordsearch();
|
||||
PTR backsearch();
|
||||
int bregexec();
|
||||
/* int bregexec(); */
|
||||
PTR bregexec();
|
||||
PTR fsearch();
|
||||
PTR fsearch_end();
|
||||
PTR rsearch();
|
||||
PTR end_word();
|
||||
PTR calc_addr();
|
||||
|
|
404
bvi.man
404
bvi.man
|
@ -1,404 +0,0 @@
|
|||
BVI(1) User Commands BVI(1)
|
||||
|
||||
|
||||
NAME
|
||||
bvi, bview - visual display editor for binary files
|
||||
|
||||
VERSION
|
||||
bvi-1.3.1
|
||||
|
||||
SYNOPSIS
|
||||
bvi [-R] [-c cmd] [-f script] file...
|
||||
bview [-R] [-c cmd] [-f script] file...
|
||||
|
||||
OPTIONS
|
||||
file...
|
||||
One or more files. The file argument indicates one or
|
||||
more files to be edited.
|
||||
|
||||
-R "Readonly": The readonly flag is set for all the
|
||||
files, preventing accidental overwriting with a write
|
||||
command.
|
||||
|
||||
-c cmd
|
||||
Execute command cmd. Begin editing by executing the
|
||||
specified editor command (usually a search or
|
||||
positioning command).
|
||||
|
||||
-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 display
|
||||
oriented editor for binary files; its command set is based
|
||||
on those of the vi(1) texteditor. As a binary editor
|
||||
cannot have the concept of "lines" there are several
|
||||
differences to Vi commands (see COMPARISON).
|
||||
|
||||
COMPARISON
|
||||
The main differences between Vi and Bvi are:
|
||||
|
||||
The screen is divided in three sections/windows: The byte
|
||||
offset (at the left side), the hex window (in the middle),
|
||||
and the ascii window (to the right) which shows the ascii
|
||||
values of those bytes in the hex window. On an 80 column
|
||||
terminal you will therefore see sixteen hex values and
|
||||
their ASCII values on each screen line. Note that the
|
||||
first byte has the offset '0' (zero).
|
||||
|
||||
You can toggle between the hex and ascii windows with the
|
||||
tabulator key (TAB). Toggling between these two windows
|
||||
does not change the current position within the file.
|
||||
|
||||
No "lines" concept: Files are treated as one long series
|
||||
of bytes only. These characters "newline" and "carriage
|
||||
return" thus are not special, ie they do not 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 as they happen to fit in. 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 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 aka Normal Mode:
|
||||
|
||||
Input is treated as commands. Note that command mode is
|
||||
the default mode after startup and when you escape/quit
|
||||
from either command line mode or input mode. Use ESC
|
||||
(escape) to cancel a partial (uncompleted) command.
|
||||
|
||||
Input Mode:
|
||||
|
||||
Input is treated as replacement of current character or is
|
||||
appended to the current file. This mode is entered from
|
||||
command mode by typing either of 'i', 'I', 'A', 'r', or
|
||||
'R'. You can enter the character itself (in the ASCII
|
||||
window) or its hexadecimal value (in the HEX window).
|
||||
Type TAB to switch between these two windows. Type ESC to
|
||||
cancel current command and return to command mode. Type
|
||||
CTRL-C to cancel current command abnormally.
|
||||
|
||||
Command line mode (aka Last Line Mode):
|
||||
|
||||
Reading input for : / ? \ # or !; terminate by typing a
|
||||
carriage return; an interrupt cancels termination. Type
|
||||
ESC to cancel 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! reedit 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 abandom 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@altavista.net
|
||||
|
||||
WWW
|
||||
Bvi Homepage: http://bvi.sourceforge.net/
|
||||
Vi Pages: http://www.math.fu-berlin.de/~guckes/vi/
|
||||
(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/2002 BVI Version 1.3.1 8
|
90
comm.c
90
comm.c
|
@ -9,15 +9,20 @@
|
|||
* 2000-03-03 V 1.3.0 beta
|
||||
* 2000-07-15 V 1.3.0 final
|
||||
* 2001-10-10 V 1.3.1
|
||||
* 2003-07-04 V 1.3.2
|
||||
* 2005-08-17 V 1.3.3
|
||||
* 2010-06-02 V 1.3.4
|
||||
* 2014-01-28 V 1.4.0
|
||||
* 2019-01-27 V 1.4.1
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2001 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -39,7 +44,7 @@
|
|||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
# include <io.h>
|
||||
# include <dir.h>
|
||||
# define WRITE (O_WRONLY|O_CREAT|O_TRUNC|O_BINARY)
|
||||
|
@ -101,11 +106,11 @@ docmdline(cmdline)
|
|||
char *cmd;
|
||||
char *p;
|
||||
size_t len;
|
||||
int n, ok;
|
||||
int n, ok, ret;
|
||||
int force = 0;
|
||||
int saveflag;
|
||||
|
||||
if (cmdline == NULL) return;
|
||||
if (*cmdline == '\0') return;
|
||||
if (*cmdline == '"') return; /** comment **/
|
||||
if (strlen(cmdline) > CMDSZ - 2) {
|
||||
emsg("Command too long");
|
||||
|
@ -114,9 +119,9 @@ docmdline(cmdline)
|
|||
strcpy(buff, cmdline);
|
||||
cmd = buff;
|
||||
|
||||
/* 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).
|
||||
*/
|
||||
/* 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).
|
||||
*/
|
||||
addr_flag = 0;
|
||||
start_addr = mem;
|
||||
end_addr = maxpos - 1;
|
||||
|
@ -153,7 +158,7 @@ docmdline(cmdline)
|
|||
return;
|
||||
}
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
@ -190,7 +195,7 @@ docmdline(cmdline)
|
|||
if (edits) msg("[No write]|[No write since last change]");
|
||||
savetty();
|
||||
endwin();
|
||||
system(cmdbuf + 1);
|
||||
ret = system(cmdbuf + 1);
|
||||
fprintf(stderr, "[Hit return to continue]");
|
||||
getchar();
|
||||
doupdate();
|
||||
|
@ -303,11 +308,7 @@ docmdline(cmdline)
|
|||
else ok = save(c_argv[0], start_addr, end_addr, saveflag);
|
||||
} else {
|
||||
if (c_argc == 0) {
|
||||
if (P(P_RO)) {
|
||||
sprintf(string, "\"%s\" File is read only", name);
|
||||
emsg(string);
|
||||
return;
|
||||
} else ok = save(name, start_addr, end_addr, saveflag);
|
||||
save_chk(name, start_addr, end_addr, saveflag);
|
||||
} else {
|
||||
if (!stat(c_argv[0], &buf)) {
|
||||
if (saveflag == WRITE) {
|
||||
|
@ -391,10 +392,10 @@ docmdline(cmdline)
|
|||
}
|
||||
if (chdir(c_argv[0])) sysemsg(c_argv[0]);
|
||||
} else if (!strncmp("edit", cmdname, len) && CMDLNG(4, 1)) {
|
||||
/*
|
||||
* The command ":e#" gets expanded to something like ":efile", so
|
||||
* detect that case here.
|
||||
*/
|
||||
/*
|
||||
* The command ":e#" gets expanded to something like ":efile", so
|
||||
* detect that case here.
|
||||
*/
|
||||
if (*cmd == 'e' && c_argc == 0) {
|
||||
if (cmd[1] == '!')
|
||||
(void) doecmd(&cmd[2], TRUE);
|
||||
|
@ -478,7 +479,7 @@ docmdline(cmdline)
|
|||
if ((yanked = yd_addr()) == 0L) return;
|
||||
if ((yanked = alloc_buf(yanked, &yank_buf)) == 0L) return;
|
||||
memcpy(yank_buf, start_addr, yanked);
|
||||
sprintf(string, "%lu bytes", (long)yanked);
|
||||
sprintf(string, "%lu bytes", (unsigned long)yanked);
|
||||
msg(string);
|
||||
} else if (!strncmp("overwrite", cmdname, len) && CMDLNG(9, 1)) {
|
||||
if (chk_comm(NO_ARG)) return;
|
||||
|
@ -565,7 +566,7 @@ docmdline(cmdline)
|
|||
if (!strncmp("delete", cmdname, len) && CMDLNG(6, 1)) {
|
||||
if ((undo_count = yd_addr()) == 0L) return;
|
||||
do_delete(undo_count, start_addr);
|
||||
sprintf(string, "%lu bytes", (long)undo_count);
|
||||
sprintf(string, "%lu bytes", (unsigned long)undo_count);
|
||||
msg(string);
|
||||
} else if (!strncmp("insert", cmdname, len) && CMDLNG(6, 1)) {
|
||||
if (chk_comm(MAX_ONE_ARG)) return;
|
||||
|
@ -625,11 +626,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
|
||||
do_exit()
|
||||
{
|
||||
if (edits) {
|
||||
if (!save(name, mem, maxpos - 1L, WRITE)) return;
|
||||
if (!save_chk(name, mem, maxpos - 1L, WRITE)) return;
|
||||
}
|
||||
if ((curfile + 1) < numfiles) {
|
||||
sprintf(string, "%d %s", numfiles - curfile - 1, morefiles);
|
||||
|
@ -658,7 +675,7 @@ doecmd(arg, force)
|
|||
}
|
||||
if (arg != NULL) {
|
||||
if (name != NULL && !strcmp(arg, name)) {
|
||||
if (!edits || (edits && !force))
|
||||
if (!edits || !force)
|
||||
return TRUE;
|
||||
}
|
||||
if (name != NULL && !strcmp(arg, "#")) {
|
||||
|
@ -708,13 +725,20 @@ emsg(s)
|
|||
char *s;
|
||||
{
|
||||
int cnt;
|
||||
int stchar;
|
||||
|
||||
if (P(P_EB)) beep();
|
||||
if (P(P_MO)) {
|
||||
stchar = statsize;
|
||||
} else {
|
||||
stchar = 0;
|
||||
}
|
||||
|
||||
clearstr();
|
||||
attrset(A_REVERSE);
|
||||
cnt = outmsg(s);
|
||||
attrset(A_NORMAL);
|
||||
if (cnt >= (maxx - 25)) { /* 25 = status */
|
||||
if (cnt >= (maxx - stchar)) {
|
||||
addch('\n');
|
||||
wait_return(TRUE); }
|
||||
}
|
||||
|
@ -754,10 +778,18 @@ void
|
|||
msg(s)
|
||||
char *s;
|
||||
{
|
||||
int stchar;
|
||||
|
||||
if (P(P_MO)) {
|
||||
stchar = statsize;
|
||||
} else {
|
||||
stchar = 0;
|
||||
}
|
||||
clearstr();
|
||||
if (outmsg(s) >= (maxx - 25)) { /* 25 = status */
|
||||
if (outmsg(s) >= (maxx - stchar)) {
|
||||
addch('\n');
|
||||
wait_return(TRUE); }
|
||||
wait_return(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -775,7 +807,8 @@ outmsg(s)
|
|||
poi = s;
|
||||
while (*poi != '\0' && *poi != '@' && *poi != '|') {
|
||||
addch(*poi++);
|
||||
cnt++; }
|
||||
cnt++;
|
||||
}
|
||||
} else {
|
||||
if (poi) poi++;
|
||||
else poi = s;
|
||||
|
@ -789,6 +822,7 @@ outmsg(s)
|
|||
return cnt;
|
||||
}
|
||||
|
||||
|
||||
/* If flag == TRUE we do a repaint
|
||||
*
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
118
config.h.in
118
config.h.in
|
@ -1,47 +1,87 @@
|
|||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/***** begin user configuration section *****/
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the strtol function. */
|
||||
#undef HAVE_STRTOL
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the <ncurses.h> header file. */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define if you have the ncurses library (-lncurses). */
|
||||
#undef HAVE_LIBNCURSES
|
||||
#undef NO_SYSERRL
|
||||
|
||||
/* Define if your tputs need putc(char) */
|
||||
#undef NEED_PUTC_CHAR
|
||||
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the `memmove' function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the <ncurses/term.h> header file. */
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the `strtol' function. */
|
||||
#undef HAVE_STRTOL
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the <termcap.h> header file. */
|
||||
#undef HAVE_TERMCAP_H
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <term.h> header file. */
|
||||
#undef HAVE_TERM_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of a `void *', as computed by sizeof. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,12 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([bvi.c])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
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 to get the SYSV curses library:
|
||||
|
@ -37,6 +40,7 @@ AC_PROG_INSTALL
|
|||
dnl Check for typedefs
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
|
||||
AC_CHECK_TYPE(size_t, unsigned int)
|
||||
|
@ -44,7 +48,7 @@ AC_CHECK_TYPE(off_t, int)
|
|||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h termcap.h termio.h termios.h unistd.h)
|
||||
AC_CHECK_HEADERS(fcntl.h termcap.h termio.h termios.h unistd.h term.h ncurses/term.h)
|
||||
|
||||
dnl Check if ncurses requested
|
||||
_cppflags="${CPPFLAGS}"
|
||||
|
@ -58,24 +62,29 @@ AC_ARG_WITH(ncurses,
|
|||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_HEADER(ncurses.h,
|
||||
AC_CHECK_LIB(ncurses, initscr,
|
||||
AC_DEFINE(HAVE_NCURSES_H) LIBS="${LIBS} -lncurses",
|
||||
AC_CHECK_LIB(curses, initscr,
|
||||
AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses",
|
||||
AC_MSG_ERROR([bvi requires the curses library]))),
|
||||
AC_CHECK_HEADER(curses.h,
|
||||
AC_CHECK_LIB(curses, initscr,
|
||||
AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses",
|
||||
AC_MSG_ERROR([bvi requires the curses library])),
|
||||
AC_MSG_ERROR([bvi requires the curses library])))
|
||||
AC_CHECK_HEADER([ncurses.h],[
|
||||
AC_SEARCH_LIBS([initscr], [ncurses],[
|
||||
AC_DEFINE(HAVE_NCURSES_H)
|
||||
AC_SEARCH_LIBS([tputs], [tinfo])], [
|
||||
AC_SEARCH_LIBS([initscr], [curses],[
|
||||
AC_DEFINE(HAVE_CURSES_H)
|
||||
AC_SEARCH_LIBS([tputs], [tinfo])],[
|
||||
AC_MSG_ERROR([bvi requires the curses library])])])],[
|
||||
AC_CHECK_HEADER([curses.h],[
|
||||
AC_SEARCH_LIBS([initscr], [curses], [
|
||||
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 AC_TYPE_SIZE_T
|
||||
|
||||
dnl Checks for library functions.
|
||||
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
|
||||
|
|
@ -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)
|
|
@ -8,8 +8,8 @@
|
|||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-1969 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@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
|
||||
|
|
5
doscur.h
5
doscur.h
|
@ -1,7 +1,7 @@
|
|||
/* DOSCUR.H - CURSES.H for TURBO C
|
||||
*
|
||||
* Copyright 1996 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@puon.at
|
||||
*
|
||||
* 1996-02-28 V 1.0.0
|
||||
* 1998-04-12 V 1.0.1
|
||||
|
@ -146,4 +146,3 @@ void attrset(int);
|
|||
|
||||
#define ERR (-1)
|
||||
|
||||
|
4
dosio.c
4
dosio.c
|
@ -10,8 +10,8 @@
|
|||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2002 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@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
|
||||
|
|
214
edit.c
214
edit.c
|
@ -8,13 +8,17 @@
|
|||
* 2000-05-14 V 1.3.0 alpha
|
||||
* 2000-07-15 V 1.3.0 final
|
||||
* 2001-12-07 V 1.3.1
|
||||
* 2003-07-04 V 1.3.2
|
||||
* 2006-04-05 V 1.3.3 alpha - binary representation
|
||||
* 2014-09-30 V 1.4.0
|
||||
* 2019-10-12 V 1.4.1
|
||||
*
|
||||
* Copyright 1996-2001 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -28,7 +32,7 @@
|
|||
#include "bvi.h"
|
||||
#include "set.h"
|
||||
|
||||
extern int precount;
|
||||
extern long precount;
|
||||
|
||||
char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",
|
||||
" BS", "TAB", " NL", "HOM", "CLR", " CR", " ^N", " ^O",
|
||||
|
@ -41,7 +45,8 @@ char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
|
|||
"CAN", " EM", "SUB", "ESC", " FS", " GS", " RS", " US",
|
||||
"DEL" };
|
||||
char tmpbuf[10];
|
||||
char linbuf[256];
|
||||
char linbuf[16384];
|
||||
long hl_spat = 0;
|
||||
|
||||
static char getcbuff[BUFFER];
|
||||
static char *getcnext = NULL;
|
||||
|
@ -112,7 +117,9 @@ edit(mode)
|
|||
setcur();
|
||||
continue;
|
||||
}
|
||||
if (ch == KEY_BACKSPACE || ch == BVICTRL('H')) {
|
||||
if (ch == KEY_BACKSPACE
|
||||
|| ch == ASCII_DEL
|
||||
|| ch == BVICTRL('H')) {
|
||||
if (count > 0) {
|
||||
len--;
|
||||
count--;
|
||||
|
@ -274,7 +281,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
|
||||
* else setpage()
|
||||
*/
|
||||
|
@ -289,14 +296,30 @@ do_ft(ch, flag)
|
|||
PTR ptr;
|
||||
|
||||
switch (ch) {
|
||||
/*
|
||||
case 1: beep();
|
||||
return NULL; /* no previous command */
|
||||
return NULL; no previous command
|
||||
case -1: if (chp == 'f' || chp == 't') dir = BACKWARD;
|
||||
else dir = FORWARD;
|
||||
break; /* same again */
|
||||
break;
|
||||
case 0: if (chp == 'f' || chp == 't') dir = FORWARD;
|
||||
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;
|
||||
if (chp == 'f' || chp == 't') dir = FORWARD;
|
||||
else dir = BACKWARD;
|
||||
|
@ -323,7 +346,10 @@ do_ft(ch, flag)
|
|||
if (ptr < mem) break;
|
||||
}
|
||||
} while (--precount > 0);
|
||||
/*
|
||||
if (*ptr == chi) {
|
||||
*/
|
||||
if (ptr >= mem && ptr <= maxpos) {
|
||||
if (loc == HEX) toggle();
|
||||
if (chp == 't') ptr--;
|
||||
if (chp == 'T') ptr++;
|
||||
|
@ -433,31 +459,64 @@ setcur()
|
|||
void
|
||||
statpos()
|
||||
{
|
||||
char bin_val [9];
|
||||
unsigned char Char1;
|
||||
int i;
|
||||
off_t bytepos;
|
||||
char string[30], str[6];
|
||||
char string[MAXCMD+1], str[6];
|
||||
|
||||
if (!P(P_MO)) return;
|
||||
bytepos = current - mem;
|
||||
if (bytepos >= filesize) {
|
||||
mvaddstr(maxy, status, " ");
|
||||
return; }
|
||||
// mvaddstr(maxy, status, " ");
|
||||
move(maxy, status);
|
||||
for (i = status; i < maxx; i++) addch(' ');
|
||||
return;
|
||||
}
|
||||
Char1 = *(mem + bytepos);
|
||||
|
||||
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';
|
||||
|
||||
sprintf(string, "%08llX %s \\%03o 0x%02X %3d ",
|
||||
(long long)(bytepos + P(P_OF)), bin_val, Char1, Char1, Char1);
|
||||
attrset(A_BOLD);
|
||||
status = maxx - 1 - statsize;
|
||||
mvaddstr(maxy, status, string);
|
||||
|
||||
if (isprint(Char1)) {
|
||||
sprintf(str, "'%c'", Char1);
|
||||
addstr(str);
|
||||
} else if (Char1 < 32) {
|
||||
if (P(P_US)) strcpy(str, contru[Char1]);
|
||||
else strcpy(str, contrd[Char1]);
|
||||
addstr(str);
|
||||
} else if (Char1 == 127) {
|
||||
if (P(P_US)) strcpy(str, contru[32]);
|
||||
else strcpy(str, contrd[32]);
|
||||
} else strcpy(str, " ");
|
||||
|
||||
sprintf(string, "%08lX \\%03o 0x%02X %3d %3s",
|
||||
(long)(bytepos + P(P_OF)), Char1, Char1, Char1, str);
|
||||
attrset(A_BOLD);
|
||||
mvaddstr(maxy, status, string);
|
||||
addstr(str);
|
||||
} else {
|
||||
if (P(P_RE)) {
|
||||
if ((Char1 & 128) && ((Char1 > 159) && (Char1 < 255))) {
|
||||
addstr("'");
|
||||
attrset(A_REVERSE);
|
||||
sprintf(str, "%c", Char1 & 127);
|
||||
addstr(str);
|
||||
attrset(A_BOLD);
|
||||
addstr("'");
|
||||
} else {
|
||||
addstr(" ");
|
||||
}
|
||||
} else {
|
||||
addstr(" ");
|
||||
}
|
||||
}
|
||||
attrset(A_NORMAL);
|
||||
}
|
||||
|
||||
|
@ -467,32 +526,99 @@ printline(mempos, scpos)
|
|||
PTR mempos;
|
||||
int scpos;
|
||||
{
|
||||
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) {
|
||||
strcpy(linbuf, "~ ");
|
||||
} else {
|
||||
sprintf(linbuf, addr_form, (long)(mempos - mem + P(P_OF)));
|
||||
|
||||
sprintf(linbuf, addr_form, (long long)(mempos - mem + P(P_OF)));
|
||||
*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++) {
|
||||
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) {
|
||||
sprintf(tmpbuf, " ");
|
||||
Zeichen = ' ';
|
||||
cur_ch = ' ';
|
||||
} else {
|
||||
Zeichen = *(mempos + print_pos);
|
||||
sprintf(tmpbuf, "%02X ", Zeichen);
|
||||
cur_ch = *(mempos + print_pos);
|
||||
sprintf(tmpbuf, "%02X ", cur_ch);
|
||||
}
|
||||
strcat(linbuf, tmpbuf);
|
||||
if (isprint(Zeichen))
|
||||
*(string + print_pos) = Zeichen;
|
||||
else
|
||||
*(string + print_pos) = '.';
|
||||
}
|
||||
*(string + Anzahl) = '\0';
|
||||
strcat(linbuf, string);
|
||||
mvaddstr(scpos, 0, linbuf);
|
||||
mvaddstr(scpos, mv_pos, linbuf);
|
||||
attrset(A_NORMAL);
|
||||
|
||||
for (print_pos = 0; print_pos < Anzahl; print_pos++) {
|
||||
if (mempos + print_pos < maxpos) {
|
||||
cur_ch = *(mempos + print_pos);
|
||||
if (isprint(cur_ch)) {
|
||||
sprintf(string, "%c", cur_ch);
|
||||
addstr(string);
|
||||
} else {
|
||||
if (P(P_RE)) {
|
||||
if ((cur_ch & 128) && ((cur_ch > 159) && (cur_ch < 255))) {
|
||||
attrset(A_REVERSE);
|
||||
sprintf(string, "%c", cur_ch & 127);
|
||||
addstr(string);
|
||||
attrset(A_NORMAL);
|
||||
} else {
|
||||
addstr(".");
|
||||
}
|
||||
} else {
|
||||
addstr(".");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addstr(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -638,11 +764,22 @@ fileinfo(fname)
|
|||
char *fname;
|
||||
{
|
||||
off_t bytepos;
|
||||
char fstatus[64];
|
||||
char fstatus[MAXCMD];
|
||||
char *string;
|
||||
|
||||
if (fname) {
|
||||
string = malloc((size_t)strlen(fname) + MAXCMD);
|
||||
if (string == NULL) {
|
||||
emsg("Out of memory");
|
||||
return;
|
||||
}
|
||||
sprintf(string, "\"%s\" ", fname);
|
||||
} else {
|
||||
string = malloc(MAXCMD);
|
||||
if (string == NULL) {
|
||||
emsg("Out of memory");
|
||||
return;
|
||||
}
|
||||
strcpy(string, "No file ");
|
||||
}
|
||||
if (filemode != NEW && filemode != REGULAR)
|
||||
|
@ -651,13 +788,16 @@ fileinfo(fname)
|
|||
if (edits) strcat(string, "[Modified] ");
|
||||
if (filesize) {
|
||||
bytepos = (pagepos + y * Anzahl + xpos()) - mem + 1L;
|
||||
sprintf(fstatus, "byte %lu of %lu --%lu%%--", (long)bytepos,
|
||||
(long)filesize, (long)(bytepos * 100L / filesize));
|
||||
sprintf(fstatus, "byte %llu of %llu --%llu%%--",
|
||||
(unsigned long long)bytepos,
|
||||
(unsigned long long)filesize,
|
||||
(unsigned long long)(bytepos * 100L / filesize));
|
||||
strcat(string, fstatus);
|
||||
} else {
|
||||
strcat(string, " 0 bytes");
|
||||
}
|
||||
msg(string);
|
||||
free(string);
|
||||
}
|
||||
|
||||
|
||||
|
@ -855,13 +995,13 @@ do_ins_chg(start, arg, mode)
|
|||
repaint();
|
||||
goto mfree;
|
||||
}
|
||||
do_append(count, tempbuf);
|
||||
do_append((off_t)count, tempbuf);
|
||||
memcpy(undo_buf, tempbuf, count);
|
||||
repaint();
|
||||
break;
|
||||
}
|
||||
mfree:
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
farfree(tempbuf);
|
||||
#else
|
||||
free(tempbuf);
|
||||
|
|
156
html/bmore.html
156
html/bmore.html
|
@ -1,156 +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 RETURN character; it displays another
|
||||
screenful in response to a SPACE 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. 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><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 Oct 13 22:30:06 CEST 2000 by Gerhard Bürgmann</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,133 +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">-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">+<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><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 Oct 13 21:38:17 CEST 2000 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
11
html/bvi.css
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;}
|
208
html/colon.html
208
html/colon.html
|
@ -1,208 +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</I>
|
||||
|
||||
|
||||
</BODY></HTML>
|
116
html/cursor.html
116
html/cursor.html
|
@ -1,116 +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</I>
|
||||
|
||||
|
||||
</BODY></HTML>
|
|
@ -1,87 +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="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.1</b>
|
||||
(Check out what's <a href="new131.html">new</a>):
|
||||
<p>
|
||||
<h3>Sources</h3>
|
||||
<ul>
|
||||
<li><a href="http://download.sourceforge.net/bvi/bvi-1.3.1.src.tar.gz">bvi-1.3.1.src.tar.gz</a>
|
||||
(168k)</li>
|
||||
<li><a href="http://download.sourceforge.net/bvi/bvi-1.3.0.src.tar.gz">bvi-1.3.0.src.tar.gz</a>
|
||||
(144k)</li>
|
||||
|
||||
</ul>
|
||||
<h3>Executables</h3>
|
||||
<ul>
|
||||
<li>Linux: <a href="http://download.sourceforge.net/bvi/bvi-1.3.1-linux_static_elf.tar.gz">bvi-1.3.1-linux_static_elf.tar.gz</a>
|
||||
(338k)</li>
|
||||
<li>Linux: <a href="http://download.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><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: February 12<sup>th</sup> 2002 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
194
html/edit.html
194
html/edit.html
|
@ -1,194 +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</I>
|
||||
|
||||
|
||||
</BODY></HTML>
|
214
html/german.html
214
html/german.html
|
@ -1,214 +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: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann</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
BIN
html/gif/bg2.gif
Binary file not shown.
Before Width: | Height: | Size: 91 B |
Binary file not shown.
Before Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 869 B |
BIN
html/gif/dot.gif
BIN
html/gif/dot.gif
Binary file not shown.
Before Width: | Height: | Size: 42 B |
BIN
html/gif/up.gif
BIN
html/gif/up.gif
Binary file not shown.
Before Width: | Height: | Size: 50 B |
125
html/index.html
125
html/index.html
|
@ -1,125 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C/DTD HTML 3.2 Final//EN">
|
||||
<html><head>
|
||||
<title>BVI - Binary VIsual editor</title>
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
if(top.frames.length!=0){top.location=location;}// -->
|
||||
</script>
|
||||
<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">
|
||||
</head><body bgcolor="#ffffff" 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>
|
||||
|
||||
<hr noshade width="60%">
|
||||
|
||||
<p><a class="thl" href="http://www.math.fu-berlin.de/~guckes/vi/">
|
||||
VI and Clones
|
||||
</a></p>
|
||||
|
||||
<p><a class="thl" href="http://spin.ch/~tpo/linux/hexeds.html">
|
||||
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>
|
||||
<h3>Original site: <a href="http://bvi.sourceforge.net/">http://bvi.sourceforge.net</a></h3>
|
||||
You can download source and compiled versions from the
|
||||
<a href="download.html">download page</a>.<br>
|
||||
Check out whats <a href="new131.html">new in 1.3.1</a>!
|
||||
|
||||
<p>
|
||||
<b>Newsgroup:</b> <a href="news:comp.editors">comp.editors</a>
|
||||
|
||||
<p>
|
||||
<b>Mailing List:</b>
|
||||
<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.1.
|
||||
<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.buergmann@altavista.net">
|
||||
Gerhard.Buergmann@altavista.net</a>
|
||||
|
||||
<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: February 12<sup>th</sup> 2002 by Gerhard Bürgmann</i>
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
</body></html>
|
|
@ -1,132 +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.1.src.tar.gz | tar xvf
|
||||
</pre>
|
||||
<li>Change to the directory <tt class="examp">bvi-1.3.1</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>
|
||||
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.1.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>
|
||||
The MSDOS version exists for historical reasons and is not really
|
||||
supported anymore.
|
||||
<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: February 12<sup>th</sup> 2002 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,171 +0,0 @@
|
|||
<xmp>
|
||||
BMORE(1) BMORE(1)
|
||||
|
||||
|
||||
NAME
|
||||
bmore - browse through a binary file
|
||||
|
||||
SYNOPSIS
|
||||
bmore [ -adi ] [ +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 (.)
|
||||
|
||||
-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.
|
||||
|
||||
+linenumber
|
||||
Start up at linenumber.
|
||||
|
||||
+/ASCII-pattern
|
||||
Start up at the line containing the regular
|
||||
expression 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.
|
||||
|
||||
|
||||
AUTHOR
|
||||
bmore was developed by Gerhard Buergmann, Vienna, Austria
|
||||
Gerhard.Buergmann@altavista.net
|
||||
|
||||
FILES
|
||||
/etc/termcap terminal data base
|
||||
/usr/local/share/bmore.help help file
|
||||
|
||||
SEE ALSO
|
||||
bvi(1), termcap(5)
|
||||
|
||||
|
||||
13/Oct/2000 BMORE Version 1.3.0
|
||||
</xmp>
|
|
@ -1,424 +0,0 @@
|
|||
<xmp>
|
||||
BVI(1) User Commands BVI(1)
|
||||
|
||||
|
||||
NAME
|
||||
bvi, bview - visual display editor for binary files
|
||||
|
||||
VERSION
|
||||
bvi-1.3.0
|
||||
|
||||
SYNOPSIS
|
||||
bvi [-R] [-c cmd] [-b begin] [-e end] [-s size] [-f script] file...
|
||||
bview [-R] [-c cmd] [-b begin] [-e end] [-s size] [-f script] 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
|
||||
tabulator key (TAB). Toggling between these two windows
|
||||
does not change the current position 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 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! reedit 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 abandom 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@altavista.net
|
||||
|
||||
WWW
|
||||
Bvi Homepage: http://bvi.linuxave.net/
|
||||
Vi Pages: http://www.math.fu-berlin.de/~guckes/vi/
|
||||
(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)
|
||||
|
||||
|
||||
13/Oct/2000 BVI Version 1.3.0 8
|
||||
</xmp>
|
155
html/new120.html
155
html/new120.html
|
@ -1,155 +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="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><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</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
102
html/new130.html
102
html/new130.html
|
@ -1,102 +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="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><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 Oct 12 20:51:06 CEST 2000 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,96 +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>
|
||||
<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><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: February 12<sup>th</sup> 2002 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,96 +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: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
101
html/qt_bit.html
101
html/qt_bit.html
|
@ -1,101 +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</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,130 +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: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,113 +0,0 @@
|
|||
<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>
|
||||
|
||||
<HR NOSHADE WIDTH=60%>
|
||||
<P>
|
||||
<A CLASS="thl" HREF="index.html">Home</A>
|
||||
</P>
|
||||
<P>
|
||||
<A CLASS="thl" HREF="quick.html">Quick Tutorial</A>
|
||||
<FONT COLOR=#FFFFFF CLASS="ths">Editing Files<BR></FONT>
|
||||
<A CLASS="ths" HREF="qt_search.html">Search Commands</A>
|
||||
<A CLASS="ths" HREF="qt_bit.html">Bit-wise Operations</A>
|
||||
<A CLASS="ths" HREF="qt_find.html">Find and Replace</A>
|
||||
<A CLASS="ths" HREF="qt_yank.html">Yank and Put</A>
|
||||
<A CLASS="ths" HREF="qt_set.html">Settings</A>
|
||||
</P>
|
||||
<P>
|
||||
<A CLASS="thl" HREF="download.html">Download</A>
|
||||
</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>Editing Files</FONT>
|
||||
</TD><TD ALIGN=RIGHT VALIGN=BOTTOM WIDTH=116 ROWSPAN=2>
|
||||
<IMG SRC="gif/bvi_s.gif" ALT="BVI" WIDTH="116" HEIGHT="62">
|
||||
</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>
|
||||
: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: 17 - 06 - 2000 by Gerhard Bürgmann</I>
|
||||
</TD></TR></TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -1,98 +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</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,144 +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</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,115 +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</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
126
html/qt_set.html
126
html/qt_set.html
|
@ -1,126 +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</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
|
@ -1,132 +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: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
199
html/quick.html
199
html/quick.html
|
@ -1,199 +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: Thu Oct 19 20:58:31 CEST 2000 by Gerhard Bürgmann</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>
|
116
html/set.html
116
html/set.html
|
@ -1,116 +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</I>
|
||||
|
||||
|
||||
</BODY></HTML>
|
|
@ -1,156 +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="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><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: February 12<sup>th</sup> 2002 by Gerhard Bürgmann</i>
|
||||
</td></tr></table>
|
||||
</body></html>
|
141
html/yank.html
141
html/yank.html
|
@ -1,141 +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</I>
|
||||
|
||||
|
||||
</BODY></HTML>
|
109
install-sh
109
install-sh
|
@ -56,7 +56,7 @@ dir_arg=""
|
|||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
|
@ -79,7 +79,7 @@ while [ x"$1" != x ]; do
|
|||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
|
@ -106,7 +106,7 @@ done
|
|||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
|
@ -115,8 +115,8 @@ fi
|
|||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
|
@ -125,20 +125,20 @@ if [ x"$dir_arg" != x ]; then
|
|||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
|
@ -147,16 +147,16 @@ else
|
|||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
@ -165,69 +165,73 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
|||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
rmtmp=$dstdir/#rm.$$#
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
|
@ -235,17 +239,38 @@ else
|
|||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
exit 0
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
|
|
143
io.c
143
io.c
|
@ -1,4 +1,4 @@
|
|||
/* IO.C - file in/out and alloc subroutines for BVI
|
||||
/* io.c - file in/out and alloc subroutines for BVI
|
||||
*
|
||||
* 1996-02-28 V 1.0.0
|
||||
* 1999-01-20 V 1.1.0
|
||||
|
@ -7,15 +7,19 @@
|
|||
* 1999-10-15 V 1.2.0 final
|
||||
* 2000-03-23 V 1.3.0 beta
|
||||
* 2000-08-17 V 1.3.0 final
|
||||
* 2004-01-04 V 1.3.2
|
||||
* 2010-06-02 V 1.3.4
|
||||
* 2014-05-03 V 1.4.0
|
||||
* 2019-01-27 V 1.4.1
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -29,11 +33,20 @@
|
|||
#include "bvi.h"
|
||||
#include "set.h"
|
||||
|
||||
#include <limits.h>
|
||||
#ifndef SIZE_T_MAX
|
||||
# define SIZE_T_MAX ULONG_MAX
|
||||
#if 0
|
||||
/* nowadays (2009) we should make sure that bvi is compiled with LFS support: */
|
||||
/* 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
|
||||
|
||||
#include <limits.h>
|
||||
# ifndef OFF_T_MAX
|
||||
# define OFF_T_MAX ULONG_LONG_MAX
|
||||
# endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
@ -47,6 +60,7 @@ static struct stat buf;
|
|||
static off_t block_read;
|
||||
char *terminal;
|
||||
|
||||
extern char *fname_buf;
|
||||
|
||||
/*********** Save the patched file ********************/
|
||||
int
|
||||
|
@ -57,7 +71,7 @@ save(fname, start, end, flags)
|
|||
int flags;
|
||||
{
|
||||
int fd;
|
||||
char string[255];
|
||||
char *string;
|
||||
char *newstr;
|
||||
off_t filesize;
|
||||
|
||||
|
@ -65,16 +79,23 @@ save(fname, start, end, flags)
|
|||
emsg("No file|No current filename");
|
||||
return 0;
|
||||
}
|
||||
string = malloc((size_t)strlen(fname) + MAXCMD);
|
||||
if (string == NULL) {
|
||||
emsg("Out of memory");
|
||||
return 0;
|
||||
}
|
||||
if (stat(fname, &buf) == -1) {
|
||||
newstr = "[New file] ";
|
||||
} else {
|
||||
if (S_ISDIR(buf.st_mode)) {
|
||||
sprintf(string, "\"%s\" Is a directory", fname);
|
||||
msg(string);
|
||||
free(string);
|
||||
return 0;
|
||||
} else if (S_ISCHR(buf.st_mode)) {
|
||||
sprintf(string, "\"%s\" Character special file", fname);
|
||||
msg(string);
|
||||
free(string);
|
||||
return 0;
|
||||
} else if (S_ISBLK(buf.st_mode)) {
|
||||
/*
|
||||
|
@ -89,36 +110,42 @@ save(fname, start, end, flags)
|
|||
if (filemode == PARTIAL) flags = O_RDWR;
|
||||
if ((fd = open(fname, flags, 0666)) < 0) {
|
||||
sysemsg(fname);
|
||||
free(string);
|
||||
return 0;
|
||||
}
|
||||
if (filemode == PARTIAL) {
|
||||
if (block_read) {
|
||||
filesize = block_read;
|
||||
sprintf(string, "\"%s\" range %lu-%lu", fname,
|
||||
(unsigned long)block_begin,
|
||||
(unsigned long)(block_begin - 1 + filesize));
|
||||
sprintf(string, "\"%s\" range %llu-%llu", fname,
|
||||
(unsigned long long)block_begin,
|
||||
(unsigned long long)(block_begin - 1 + filesize));
|
||||
if (lseek(fd, block_begin, SEEK_SET) < 0) {
|
||||
sysemsg(fname);
|
||||
free(string);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
msg("Null range");
|
||||
free(string);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
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) {
|
||||
sysemsg(fname);
|
||||
free(string);
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
close(fd);
|
||||
edits = 0;
|
||||
msg(string);
|
||||
free(string);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -129,17 +156,31 @@ load(fname)
|
|||
char *fname;
|
||||
{
|
||||
int fd = -1;
|
||||
char string[MAXCMD];
|
||||
//char *string;
|
||||
|
||||
buf.st_size = 0L;
|
||||
if (fname != NULL) {
|
||||
/*
|
||||
sprintf(string, "\"%s\"", fname);
|
||||
msg(string);
|
||||
refresh();
|
||||
*/
|
||||
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)) {
|
||||
filemode = DIRECTORY;
|
||||
*/
|
||||
} else if (S_ISCHR(buf.st_mode)) {
|
||||
filemode = CHARACTER_SPECIAL;
|
||||
} else if (S_ISBLK(buf.st_mode)) {
|
||||
|
@ -157,15 +198,23 @@ load(fname)
|
|||
sysemsg(fname);
|
||||
filemode = ERROR;
|
||||
}
|
||||
} else if (S_ISREG(buf.st_mode)) {
|
||||
if ((unsigned long)buf.st_size > (unsigned long)SIZE_T_MAX) {
|
||||
} else if (S_ISREG(buf.st_mode) || S_ISDIR(buf.st_mode)) {
|
||||
#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);
|
||||
endwin();
|
||||
printf("File too large\n");
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
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)) {
|
||||
P(P_RO) = TRUE;
|
||||
params[P_RO].flags |= P_CHANGED;
|
||||
|
@ -181,6 +230,9 @@ load(fname)
|
|||
if (mem != NULL) free(mem);
|
||||
memsize = 1024;
|
||||
if (block_flag) {
|
||||
if (block_flag == BLOCK_BEGIN) {
|
||||
block_size = buf.st_size - block_begin;
|
||||
}
|
||||
memsize += block_size;
|
||||
} else if (filemode == REGULAR) {
|
||||
memsize += buf.st_size;
|
||||
|
@ -193,6 +245,16 @@ load(fname)
|
|||
}
|
||||
clear_marks();
|
||||
|
||||
if (fname_buf) free(fname_buf);
|
||||
if (fname != NULL) {
|
||||
fname_buf = malloc((size_t)strlen(fname) + MAXCMD);
|
||||
} else {
|
||||
fname_buf = malloc(MAXCMD);
|
||||
}
|
||||
if (fname_buf == NULL) {
|
||||
emsg("Out of memory");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (block_flag && ((filemode == REGULAR) || (filemode == BLOCK_SPECIAL))) {
|
||||
if (lseek(fd, block_begin, SEEK_SET) < 0) {
|
||||
|
@ -200,21 +262,21 @@ load(fname)
|
|||
filemode = ERROR;
|
||||
} else {
|
||||
if ((filesize = read(fd, mem, block_size)) == 0) {
|
||||
sprintf(string, "\"%s\" Empty file", fname);
|
||||
sprintf(fname_buf, "\"%s\" Empty file", fname);
|
||||
filemode = ERROR;
|
||||
} else {
|
||||
sprintf(string, "\"%s\" range %lu-%lu", fname,
|
||||
(unsigned long)block_begin,
|
||||
(unsigned long)(block_begin + filesize - 1));
|
||||
sprintf(fname_buf, "\"%s\" range %llu-%llu", fname,
|
||||
(unsigned long long)block_begin,
|
||||
(unsigned long long)(block_begin + filesize - 1));
|
||||
filemode = PARTIAL;
|
||||
block_read = filesize;
|
||||
P(P_OF) = block_begin;
|
||||
params[P_OF].flags |= P_CHANGED;
|
||||
}
|
||||
msg(string);
|
||||
msg(fname_buf);
|
||||
refresh();
|
||||
}
|
||||
} else if (filemode == REGULAR) {
|
||||
} else if ((filemode == REGULAR) || (filemode == DIRECTORY)) {
|
||||
filesize = buf.st_size;
|
||||
if (read(fd, mem, filesize) != filesize) {
|
||||
sysemsg(fname);
|
||||
|
@ -227,30 +289,31 @@ load(fname)
|
|||
if (fname != NULL) {
|
||||
switch (filemode) {
|
||||
case NEW:
|
||||
sprintf(string, "\"%s\" [New File]", fname);
|
||||
sprintf(fname_buf, "\"%s\" [New File]", fname);
|
||||
break;
|
||||
case REGULAR:
|
||||
sprintf(string, "\"%s\" %s%lu bytes", fname,
|
||||
sprintf(fname_buf, "\"%s\" %s%llu bytes", fname,
|
||||
P(P_RO) ? "[Read only] " : "",
|
||||
(unsigned long)filesize);
|
||||
(unsigned long long)filesize);
|
||||
break;
|
||||
case DIRECTORY:
|
||||
sprintf(string, "\"%s\" Directory", fname);
|
||||
sprintf(fname_buf, "\"%s\" Directory", fname);
|
||||
break;
|
||||
case CHARACTER_SPECIAL:
|
||||
sprintf(string, "\"%s\" Character special file", fname);
|
||||
sprintf(fname_buf, "\"%s\" Character special file", fname);
|
||||
break;
|
||||
case BLOCK_SPECIAL:
|
||||
sprintf(string, "\"%s\" Block special file", fname);
|
||||
sprintf(fname_buf, "\"%s\" Block special file", fname);
|
||||
break;
|
||||
}
|
||||
if (filemode != ERROR) msg(string);
|
||||
if (filemode != ERROR) msg(fname_buf);
|
||||
}
|
||||
pagepos = mem;
|
||||
maxpos = mem + filesize;
|
||||
loc = HEX;
|
||||
x = AnzAdd; y = 0;
|
||||
repaint();
|
||||
//free(string);
|
||||
return(filesize);
|
||||
}
|
||||
|
||||
|
@ -275,6 +338,15 @@ bvi_init(dir)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef DJGPP
|
||||
strcpy(rcpath, "c:");
|
||||
strcpy(rcpath, dir);
|
||||
poi = strrchr(rcpath, '\\');
|
||||
*poi = '\0';
|
||||
strcat(rcpath, "\\BVI.RC");
|
||||
read_rc(rcpath);
|
||||
read_rc("BVI.RC");
|
||||
#else
|
||||
strncpy(rcpath, getenv("HOME"), MAXCMD - 8);
|
||||
rcpath[MAXCMD - 8] = '\0';
|
||||
strcat(rcpath, "/.bvirc");
|
||||
|
@ -286,6 +358,7 @@ bvi_init(dir)
|
|||
if (stat(rcpath, &buf) == 0) {
|
||||
if (buf.st_uid == getuid()) read_rc(rcpath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -325,9 +398,15 @@ enlarge(add)
|
|||
void
|
||||
do_shell()
|
||||
{
|
||||
int ret;
|
||||
|
||||
addch('\n');
|
||||
savetty();
|
||||
system(shell);
|
||||
#ifdef DJGPP
|
||||
ret = system("");
|
||||
#else
|
||||
ret = system(shell);
|
||||
#endif
|
||||
resetty();
|
||||
}
|
||||
|
||||
|
|
123
mkinstalldirs
123
mkinstalldirs
|
@ -4,8 +4,6 @@
|
|||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.1 2001/05/22 14:43:50 akim Exp $
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
|
@ -14,61 +12,100 @@ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
|||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
lasterr=""
|
||||
chmod $dirmode "$pathcomp" || lasterr=$?
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode:shell-script
|
||||
# sh-indentation:3
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define VERSION "1.3.1"
|
||||
#define VERSION "1.4.1"
|
||||
|
|
88
re.c
88
re.c
|
@ -8,13 +8,16 @@
|
|||
* 1999-09-10 V 1.2.0
|
||||
* 2000-04-25 V 1.3.0 beta
|
||||
* 2000-09-29 V 1.3.0 final
|
||||
* 2010-06-02 V 1.3.4
|
||||
* 2013-08-24 V 1.4.0
|
||||
* 2019-01-28 V 1.4.1
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -43,7 +46,7 @@ char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot ma
|
|||
|
||||
|
||||
|
||||
int
|
||||
PTR
|
||||
bregexec(start, scan)
|
||||
PTR start;
|
||||
char *scan;
|
||||
|
@ -59,10 +62,12 @@ bregexec(start, scan)
|
|||
if (P(P_IC) && smode == ASCII) test = toupper(*start);
|
||||
else test = *start;
|
||||
if (count == 1) {
|
||||
if (test != *scan) return 0;
|
||||
/* if (test != *scan) return 0; */
|
||||
if (test != *scan) return NULL;
|
||||
scan++;
|
||||
} 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;
|
||||
}
|
||||
*act++ = *start++;
|
||||
|
@ -83,9 +88,11 @@ bregexec(start, scan)
|
|||
while (start < maxpos) {
|
||||
if (bregexec(start, scan + count)) {
|
||||
*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++;
|
||||
if (P(P_IC) && smode == ASCII) test = toupper(*start);
|
||||
else test = *start;
|
||||
|
@ -100,14 +107,19 @@ bregexec(start, scan)
|
|||
}
|
||||
} else { /* ".*" */
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*act = '\0';
|
||||
return 1; /* found */
|
||||
return start; /* found */
|
||||
/* return 1; */
|
||||
}
|
||||
|
||||
|
||||
|
@ -268,7 +280,8 @@ do_substitution(delim, line, startpos, endpos)
|
|||
} else {
|
||||
if ((n = hexchar()) < 0) {
|
||||
emsg("Badly formed replacement pattern");
|
||||
return 0; }
|
||||
return 0;
|
||||
}
|
||||
repl_pat[pat_len] = n;
|
||||
pat_len++;
|
||||
}
|
||||
|
@ -291,9 +304,9 @@ do_substitution(delim, line, startpos, endpos)
|
|||
if (strchr(cmd, 'c')) conf = 1;
|
||||
}
|
||||
if ((strchr("\\#", ch) && loc == ASCII)
|
||||
|| (strchr("/?", ch) && loc == HEX))
|
||||
|| (strchr("/?", ch) && loc == HEX)) {
|
||||
toggle();
|
||||
|
||||
}
|
||||
startpos--;
|
||||
move(maxy, 0);
|
||||
refresh();
|
||||
|
@ -377,15 +390,16 @@ searching(ch, line, startpos, endpos, flag)
|
|||
|
||||
if (line[0] == '\0' && again == 0) {
|
||||
emsg(noprev);
|
||||
return 0L; }
|
||||
return 0L;
|
||||
}
|
||||
|
||||
ignore_case = (P(P_IC));
|
||||
magic = P(P_MA);
|
||||
start_addr--;
|
||||
if ((strchr("\\#", ch) && loc == ASCII)
|
||||
|| (strchr("/?", ch) && loc == HEX))
|
||||
|| (strchr("/?", ch) && loc == HEX)) {
|
||||
toggle();
|
||||
|
||||
}
|
||||
if (!strchr("Nn", ch)) {
|
||||
m[0] = ch;
|
||||
m[1] = '\0';
|
||||
|
@ -425,7 +439,7 @@ searching(ch, line, startpos, endpos, flag)
|
|||
if (flag & 1) {
|
||||
msg("Search wrapped BOTTOM|Search wrapped around BOTTOM of buffer");
|
||||
found = fsearch(mem, startpos, search_pat);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
found = rsearch(startpos - 1, mem, search_pat);
|
||||
if (flag & S_GLOBAL) return(found);
|
||||
|
@ -433,17 +447,18 @@ searching(ch, line, startpos, endpos, flag)
|
|||
if (flag & 1) {
|
||||
msg("Search wrapped TOP|Search wrapped around TOP of buffer");
|
||||
found = rsearch(endpos, startpos, search_pat);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (flag & 1) {
|
||||
emsg(notfound);
|
||||
} else {
|
||||
if (P(P_TE))
|
||||
if (P(P_TE)) {
|
||||
sprintf(string, "No match to %s", sdir == FORWARD ? "BOTTOM" : "TOP");
|
||||
else
|
||||
} else {
|
||||
sprintf(string, "Address search hit %s without matching pattern",
|
||||
sdir == FORWARD ? "BOTTOM" : "TOP");
|
||||
}
|
||||
emsg(string);
|
||||
}
|
||||
} else {
|
||||
|
@ -484,17 +499,23 @@ patcpy(s1, s2, delim)
|
|||
|
||||
|
||||
PTR
|
||||
fsearch_end(start, end, smem, s_end)
|
||||
/*
|
||||
fsearch(start, end, smem)
|
||||
*/
|
||||
PTR start;
|
||||
PTR end;
|
||||
char *smem;
|
||||
PTR *s_end;
|
||||
{
|
||||
PTR spos;
|
||||
|
||||
signal(SIGINT, jmpproc);
|
||||
for (spos = start; spos <= end; spos++) {
|
||||
if (bregexec(spos, smem)) {
|
||||
/* if (bregexec(spos, smem)) { */
|
||||
if (*s_end = bregexec(spos, smem)) {
|
||||
signal(SIGINT, SIG_IGN);
|
||||
*s_end++;
|
||||
return(spos);
|
||||
}
|
||||
}
|
||||
|
@ -503,6 +524,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
|
||||
rsearch(start, end, smem)
|
||||
PTR start;
|
||||
|
@ -539,7 +571,7 @@ calc_addr(pointer, def_addr)
|
|||
addr = def_addr;
|
||||
SKIP_WHITE
|
||||
if (*cmd >= '1' && *cmd <= '9') {
|
||||
addr = mem + strtol(cmd, &cmd, 10) - P(P_OF);
|
||||
addr = mem + strtoll(cmd, &cmd, 10) - P(P_OF);
|
||||
} else {
|
||||
ch = *cmd;
|
||||
switch (ch) {
|
||||
|
@ -616,19 +648,11 @@ calc_addr(pointer, def_addr)
|
|||
if (*cmd == '+') {
|
||||
cmd++;
|
||||
SKIP_WHITE
|
||||
if (*cmd >= '1' && *cmd <= '9') {
|
||||
addr += strtol(cmd, &cmd, 10);
|
||||
} else if (*cmd == '0') {
|
||||
addr += strtol(cmd, &cmd, 16);
|
||||
}
|
||||
addr += strtoll(cmd, &cmd, 0);
|
||||
} else {
|
||||
cmd++;
|
||||
SKIP_WHITE
|
||||
if (*cmd >= '1' && *cmd <= '9') {
|
||||
addr -= strtol(cmd, &cmd, 10);
|
||||
} else if (*cmd == '0') {
|
||||
addr -= strtol(cmd, &cmd, 16);
|
||||
}
|
||||
addr -= strtoll(cmd, &cmd, 0);
|
||||
}
|
||||
SKIP_WHITE
|
||||
}
|
||||
|
|
7
recomp.c
7
recomp.c
|
@ -5,13 +5,14 @@
|
|||
* 1996-01-06 created;
|
||||
* 2000-04-25 V 1.3.0 beta
|
||||
* 2000-07-12 V 1.3.0 final
|
||||
* 2019-01-28 V 1.4.1
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
|
65
set.c
65
set.c
|
@ -9,14 +9,18 @@
|
|||
* 1999-07-02 V 1.2.0 beta
|
||||
* 1999-08-14 V 1.2.0 final
|
||||
* 2000-07-15 V 1.3.0 final
|
||||
* 2001-10-10 V 1.3.1 cast for alloc_buf
|
||||
* 2001-10-10 V 1.3.1
|
||||
* 2003-07-03 V 1.3.2
|
||||
* 2010-06-02 V 1.2.4
|
||||
* 2014-09-30 V 1.4.0
|
||||
* 2019-01-22 V 1.4.1
|
||||
*
|
||||
* Copyright 1996-2001 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -32,8 +36,8 @@
|
|||
|
||||
static int from_file = 0;
|
||||
static FILE *ffp;
|
||||
static char fbuf[256];
|
||||
static char buf[64];
|
||||
static char fbuf[MAXCMD+1];
|
||||
static char buf[MAXCMD+1];
|
||||
|
||||
struct param params[] = {
|
||||
{ "autowrite", "aw", FALSE, "", P_BOOL },
|
||||
|
@ -52,7 +56,9 @@ struct param params[] = {
|
|||
{ "window", "window", 25, "", P_NUM },
|
||||
{ "wordlength", "wl", 4, "", P_NUM },
|
||||
{ "wrapscan", "ws", TRUE, "", P_BOOL },
|
||||
#ifdef __MSDOS__
|
||||
{ "highlight", "hl", TRUE, "", P_BOOL },
|
||||
{ "reverse", "re", FALSE, "", P_BOOL },
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
{ "color", "co", 7, "", P_NUM },
|
||||
#endif
|
||||
{ "", "", 0, "", 0, } /* end marker */
|
||||
|
@ -98,8 +104,9 @@ doset(arg)
|
|||
sprintf(buf, " %s=%s", params[i].fullname,
|
||||
params[i].svalue);
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
|
@ -116,13 +123,9 @@ doset(arg)
|
|||
return 1;
|
||||
} else {
|
||||
s = arg + strlen(s) + 1;
|
||||
if (*s == '0') {
|
||||
params[i].nvalue = strtol(s, &s, 16);
|
||||
} else {
|
||||
params[i].nvalue = strtol(s, &s, 10);
|
||||
}
|
||||
params[i].nvalue = strtoll(s, &s, 0);
|
||||
params[i].flags |= P_CHANGED;
|
||||
#ifdef __MSDOS__
|
||||
#if defined(__MSDOS__) && !defined(DJGPP)
|
||||
if (i == P_CO) {
|
||||
textcolor(P(P_CO) & 0x07);
|
||||
textbackground((P(P_CO) & 0xf0) >> 4);
|
||||
|
@ -151,6 +154,13 @@ doset(arg)
|
|||
} else {
|
||||
params[i].nvalue = state;
|
||||
params[i].flags |= P_CHANGED;
|
||||
if (i == P_HL && state == FALSE) {
|
||||
hl_spat = FALSE;
|
||||
repaint();
|
||||
}
|
||||
if (i == P_RE) {
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -186,7 +196,7 @@ showparms(all)
|
|||
else if (p->flags & P_TEXT)
|
||||
sprintf(buf, " %s=%s\n", p->fullname, p->svalue);
|
||||
else
|
||||
sprintf(buf, " %s=%ld\n", p->fullname, p->nvalue);
|
||||
sprintf(buf, " %s=%lld\n", p->fullname, (long long)p->nvalue);
|
||||
|
||||
msg(buf);
|
||||
n++;
|
||||
|
@ -204,10 +214,13 @@ int
|
|||
read_rc(fn)
|
||||
char *fn;
|
||||
{
|
||||
if((ffp = fopen(fn, "r")) == NULL) return -1;
|
||||
int i;
|
||||
|
||||
if ((ffp = fopen(fn, "r")) == NULL) return -1;
|
||||
from_file = 1;
|
||||
while(fgets(fbuf, 255, ffp) != NULL) {
|
||||
strtok(fbuf, "\n\r");
|
||||
while (fgets(fbuf, MAXCMD, ffp) != NULL) {
|
||||
i = strlen(fbuf) - 1;
|
||||
while ((i >= 0) && (fbuf[i] == NL || fbuf[i] == CR)) fbuf[i--] = '\0';
|
||||
docmdline(fbuf);
|
||||
}
|
||||
fclose(ffp);
|
||||
|
@ -244,7 +257,7 @@ do_logic(mode, str)
|
|||
} else if (str[0] == 'b' || str[0] == 'B') {
|
||||
value = strtol(str + 1, NULL, 2);
|
||||
} else if (str[0] == '0') {
|
||||
value = strtol(str, NULL, 16);
|
||||
value = strtol(str, NULL, 0);
|
||||
for (n = 0; n < strlen(str); n++) {
|
||||
if (!isxdigit(str[n])) {
|
||||
value = -1;
|
||||
|
@ -310,12 +323,14 @@ getcmdstr(p, x)
|
|||
int x;
|
||||
{
|
||||
int c;
|
||||
int n;
|
||||
int i, n;
|
||||
char *buff, *q;
|
||||
|
||||
if (from_file) {
|
||||
if(fgets(p, 255, ffp) != NULL) {
|
||||
strtok(p, "\n\r");
|
||||
if (fgets(p, 255, ffp) != NULL) {
|
||||
// strtok(p, "\n\r");
|
||||
i = strlen(p) - 1;
|
||||
while ((i >= 0) && (p[i] == NL || p[i] == CR)) p[i--] = '\0';
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
@ -328,6 +343,7 @@ getcmdstr(p, x)
|
|||
do {
|
||||
switch (c = vgetc()) {
|
||||
case BVICTRL('H'):
|
||||
case ASCII_DEL:
|
||||
case KEY_BACKSPACE:
|
||||
case KEY_LEFT:
|
||||
if (p > buff) {
|
||||
|
@ -358,6 +374,9 @@ getcmdstr(p, x)
|
|||
#if CR != KEY_ENTER
|
||||
case CR:
|
||||
#endif
|
||||
case KEY_RIGHT:
|
||||
case KEY_UP:
|
||||
case KEY_DOWN:
|
||||
case KEY_ENTER:
|
||||
break;
|
||||
default: /* a normal character */
|
||||
|
|
15
set.h
15
set.h
|
@ -2,8 +2,8 @@
|
|||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
* Copyright 1996-2019 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@puon.at
|
||||
*
|
||||
* 1998-03-14 V 1.0.0
|
||||
* 1999-01-14 V 1.1.0
|
||||
|
@ -11,10 +11,13 @@
|
|||
* 1999-07-02 V 1.2.0 beta
|
||||
* 1999-08-14 V 1.2.0 final
|
||||
* 2000-08-21 V 1.3.0 final
|
||||
* 2010-06-02 V 1.3.4
|
||||
* 2013-08-23 V 1.4.0
|
||||
* 2019-01-22 V 1.4.1
|
||||
*
|
||||
* 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
|
||||
* Free Software Foundation; either version 3, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
|
@ -29,7 +32,7 @@
|
|||
struct param {
|
||||
char *fullname; /* full parameter name */
|
||||
char *shortname; /* permissible abbreviation */
|
||||
long nvalue;
|
||||
off_t nvalue;
|
||||
char *svalue;
|
||||
int flags;
|
||||
};
|
||||
|
@ -64,7 +67,9 @@ extern struct param params[];
|
|||
#define P_LI 13 /* lines */
|
||||
#define P_WL 14 /* Wordlength for w, W, b, B command */
|
||||
#define P_WS 15 /* wrapscan */
|
||||
#define P_CO 16 /* color/attribute setting */
|
||||
#define P_HL 16 /* highlight search enabled */
|
||||
#define P_RE 17 /* reverse video */
|
||||
#define P_CO 18 /* color/attribute setting */
|
||||
|
||||
/*
|
||||
* Macro to get the value of a parameter
|
||||
|
|
|
@ -0,0 +1,566 @@
|
|||
!_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.9~svn20110310 //
|
||||
AND bvi.h 90;" d
|
||||
ANSI bmore.h 104;" d
|
||||
ANSI bvi.h 120;" d
|
||||
APPEND comm.c 51;" d file:
|
||||
APPEND comm.c 54;" d file:
|
||||
ASCII bmore.h 83;" d
|
||||
ASCII bvi.h 97;" d
|
||||
ASCII_DEL bvi.h 106;" 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 85;" d
|
||||
BACKWARD bvi.h 99;" 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 75;" d
|
||||
BLOCK_SPECIAL bvi.h 66;" d
|
||||
BS bmore.h 88;" d
|
||||
BS bvi.h 102;" d
|
||||
BUFFER bmore.h 116;" d
|
||||
BUFFER bvi.h 134;" d
|
||||
BVICTRL bmore.h 92;" d
|
||||
BVICTRL bvi.h 105;" d
|
||||
CHARACTER_SPECIAL bmore.h 74;" d
|
||||
CHARACTER_SPECIAL bvi.h 65;" d
|
||||
CMDLNG bvi.h 108;" d
|
||||
CMDSZ comm.c 57;" d file:
|
||||
COLS dosio.c /^int COLS = 80;$/;" v
|
||||
CR bmore.h 86;" d
|
||||
CR bvi.h 100;" d
|
||||
DELIM bmore.h 107;" d
|
||||
DELIM bmore.h 112;" d
|
||||
DELIM bvi.h 123;" d
|
||||
DELIM bvi.h 130;" d
|
||||
DIRECTORY bmore.h 73;" d
|
||||
DIRECTORY bvi.h 64;" d
|
||||
ECHO dosio.c /^int ECHO = TRUE;$/;" v
|
||||
END bmore.h 79;" d
|
||||
END bvi.h 70;" d
|
||||
ERR doscur.h 147;" d
|
||||
ERROR bmore.h 70;" d
|
||||
ERROR bvi.h 61;" d
|
||||
ESC bmore.h 89;" d
|
||||
ESC bvi.h 103;" d
|
||||
ESC doscur.h 31;" d
|
||||
FALSE bmore.h 100;" d
|
||||
FALSE bvi.h 116;" d
|
||||
FALSE doscur.h 29;" d
|
||||
FORWARD bmore.h 84;" d
|
||||
FORWARD bvi.h 98;" d
|
||||
HAVE_CURSES_H acconfig.h 5;" d
|
||||
HAVE_FCNTL_H dosconf.h 40;" d
|
||||
HAVE_LOCALE_H dosconf.h 44;" d
|
||||
HAVE_MEMMOVE dosconf.h 31;" d
|
||||
HAVE_NCURSES_H acconfig.h 3;" d
|
||||
HAVE_NCURSES_TERM_H acconfig.h 11;" d
|
||||
HAVE_STRDUP dosconf.h 34;" d
|
||||
HAVE_STRTOL dosconf.h 37;" d
|
||||
HELPFILE bmore.c 43;" d file:
|
||||
HELPFILE bmore.c 45;" d file:
|
||||
HEX bvi.h 96;" d
|
||||
Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v
|
||||
JOEHTG bvi.h 43;" 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
|
||||
LINES dosio.c /^int LINES = 25;$/;" v
|
||||
LROTATE bvi.h 88;" d
|
||||
LSHIFT bvi.h 86;" d
|
||||
MAXCMD bmore.h 115;" d
|
||||
MAXCMD bvi.h 133;" d
|
||||
MAXNAME comm.c 58;" d file:
|
||||
MAX_ONE_ARG comm.c 63;" d file:
|
||||
MAX_ONE_FILE comm.c 65;" d file:
|
||||
NEED_PUTC_CHAR acconfig.h 9;" d
|
||||
NEED_PUTC_CHAR bm_unix.c 52;" d file:
|
||||
NEG bvi.h 93;" d
|
||||
NEW bmore.h 72;" d
|
||||
NEW bvi.h 63;" d
|
||||
NL bmore.h 87;" d
|
||||
NL bvi.h 101;" d
|
||||
NODEL dosio.c /^int NODEL = FALSE;$/;" v
|
||||
NOT bvi.h 94;" d
|
||||
NO_ADDR comm.c 60;" d file:
|
||||
NO_ARG comm.c 61;" d file:
|
||||
NO_SYSERRL acconfig.h 7;" d
|
||||
NULL bmore.h 95;" d
|
||||
NULL bvi.h 111;" d
|
||||
OFF_T_MAX io.c 47;" d file:
|
||||
ONE bmore.h 80;" d
|
||||
ONE bvi.h 71;" d
|
||||
ONE_ARG comm.c 62;" d file:
|
||||
ONE_FILE comm.c 64;" d file:
|
||||
OR bvi.h 91;" d
|
||||
P set.h 77;" d
|
||||
PARTIAL bmore.h 76;" d
|
||||
PARTIAL bvi.h 67;" d
|
||||
PRINTF bmore.c 38;" d file:
|
||||
PRINTF bmore.c 40;" d file:
|
||||
PTR bmore.h 105;" d
|
||||
PTR bmore.h 111;" d
|
||||
PTR bvi.h 121;" d
|
||||
PTR bvi.h 129;" d
|
||||
P_AW set.h 54;" d
|
||||
P_BOOL set.h 42;" d
|
||||
P_CHANGED set.h 45;" d
|
||||
P_CM set.h 55;" d
|
||||
P_CO set.h 72;" d
|
||||
P_EB set.h 56;" d
|
||||
P_HL set.h 70;" d
|
||||
P_IC set.h 57;" d
|
||||
P_LI set.h 67;" d
|
||||
P_MA set.h 58;" d
|
||||
P_MM set.h 59;" d
|
||||
P_MO set.h 63;" d
|
||||
P_NUM set.h 43;" d
|
||||
P_OF set.h 60;" d
|
||||
P_RE set.h 71;" d
|
||||
P_RO set.h 61;" d
|
||||
P_SS set.h 62;" d
|
||||
P_TE set.h 65;" d
|
||||
P_TEXT set.h 44;" d
|
||||
P_TT set.h 64;" d
|
||||
P_US set.h 66;" d
|
||||
P_WL set.h 68;" d
|
||||
P_WS set.h 69;" d
|
||||
REGULAR bmore.h 71;" d
|
||||
REGULAR bvi.h 62;" d
|
||||
REPLACE bmore.h 91;" d
|
||||
RROTATE bvi.h 89;" d
|
||||
RSHIFT bvi.h 87;" d
|
||||
SEARCH bmore.h 90;" d
|
||||
SEARCH bvi.h 104;" d
|
||||
SKIP_WHITE bvi.h 136;" d
|
||||
STAR bmore.h 81;" d
|
||||
STAR bvi.h 72;" d
|
||||
STDC_HEADERS dosconf.h 28;" d
|
||||
S_GLOBAL bvi.h 83;" d
|
||||
S_ISBLK bvi.h 198;" d
|
||||
S_ISCHR bvi.h 197;" d
|
||||
S_ISDIR bvi.h 196;" d
|
||||
S_ISFIFO bvi.h 200;" d
|
||||
S_ISREG bvi.h 199;" d
|
||||
TBUFSIZ bm_dos.c 32;" d file:
|
||||
TBUFSIZ bm_unix.c 32;" d file:
|
||||
TRUE bmore.h 99;" d
|
||||
TRUE bvi.h 115;" d
|
||||
TRUE doscur.h 28;" d
|
||||
U_APPEND bvi.h 80;" d
|
||||
U_BACK bvi.h 79;" d
|
||||
U_DELETE bvi.h 78;" d
|
||||
U_EDIT bvi.h 75;" d
|
||||
U_INSERT bvi.h 77;" d
|
||||
U_TILDE bvi.h 81;" d
|
||||
U_TRUNC bvi.h 76;" d
|
||||
VERSION patchlevel.h 1;" d
|
||||
WINDOW doscur.h 60;" d
|
||||
WRITE comm.c 50;" d file:
|
||||
WRITE comm.c 53;" d file:
|
||||
XOR bvi.h 92;" d
|
||||
_block_datum bvi.h /^typedef enum _block_datum {$/;" g
|
||||
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
|
||||
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
|
||||
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[MAXCMD+1];$/;" 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, r_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 = "GPL (C) 1990-2019 by Gerhard Buergmann";$/;" v
|
||||
copyright bvi.c /^char *copyright = "(C) GPL 1996-2019 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, r_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
|
||||
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
|
||||
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[MAXCMD+1];$/;" 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
|
||||
fname_buf bvi.c /^char *fname_buf = NULL;$/;" v
|
||||
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
|
||||
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
|
||||
linbuf edit.c /^char linbuf[16384];$/;" v
|
||||
line bvi.c /^static char line[MAXCMD+1];$/;" 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
|
||||
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 126;" d
|
||||
memmove bm_unix.c /^memmove(s1, s2, n)$/;" f
|
||||
memmove bvi.h 127;" 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+1]; \/* 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 106;" d
|
||||
off_t bvi.h 122;" 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
|
||||
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
|
||||
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
|
||||
r_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v
|
||||
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, statsize;$/;" 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
|
||||
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
|
||||
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
|
||||
statsize bvi.c /^int screen, status, statsize;$/;" v
|
||||
status bvi.c /^int screen, status, statsize;$/;" v
|
||||
stdscr dosio.c /^int stdscr = 0;$/;" v
|
||||
strcasecmp bmore.h 109;" d
|
||||
strcasecmp bvi.h 125;" d
|
||||
strdup io.c /^strdup(s)$/;" f
|
||||
string bmore.c /^char string[MAXCMD];$/;" v
|
||||
string bvi.c /^char string[MAXCMD+1];$/;" v
|
||||
strncasecmp bmore.h 108;" d
|
||||
strncasecmp bvi.h 124;" 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
|
Loading…
Reference in New Issue