home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
vrac
/
cread213.zip
/
READ.ENG
< prev
next >
Wrap
Text File
|
1994-10-17
|
21KB
|
473 lines
READ - A Text Browser
=====================
(Siehe READ.DEU für deutsche Dokumentation)
0. Why READ?
------------
Archives, Public Domain disks and other software is often shipped with
ready-to-print documentation (like this file); you just have to send it
to your printer... and then you've got 100 sheets of paper less, and
ribbons or toner cartridges cost money, too. So it's advisable to have
a look at the documentation file first, maybe you don't need it printed.
Just type TYPE PROGRAM.DOC | more <┘. But what was that just one screen
ago? ****, same procedure again. Well, that's really not comfortable.
You might say: 'Well, I've got a README.EXE or LIST.EXE (or something)
to read texts.' Fine. Ever tried to read texts that are formatted with
more than 80 columns? Sure, you can scroll horizontally, but maybe your
video adapter is capable of some extended text modes... even if the
manual doesn't specify them... READ uses them!
Text files often contain formfeed characters. Does your lister show them
as a female sign, or does it show clear page separation? Can you leap
page-wise through your text? Does your browser recognize the longest line
on screen and scrolls horizontally as far as necessary to display the right-
most character?
Does your lister recognize typical text files if you don't specify
them?
Can your lister be used as a replacement for MORE? Can it accept data
piped in from another program?
Does your lister understand UNIX files (without CR in front of LF)?
Is your browser able to show text files with different charsets? Like
ISO-8859-1?
Can your lister be mostly operated with a mouse?
Is your lister capable of maintaining bookmarks, even with several
files and even over several sessions?
Ever tried to list files with 1000 characters each line with other
browsers? Or very large files of up to 4Gb? READ won't barf on them...
Well, I hope you're convinced that READ is just what you've always wanted.
1. Requirements
---------------
READ is fairly modest. It gets along with about 122k of memory (58k if
you have enough EMS, and just 95k/31k if you use a small filetable), and
it's already fast enough on an XT. Nearly every graphics card is supported,
even in its special modes. DOS 3.xx is required, DOS 5.xx or 6.xx advisable.
A hard disk is not needed. In DesqView(tm), READ runs in an 128k window if
you zoom it; when idle, READ does not consume any considerable amount of
CPU time in multitasking environments like DesqView and Windows.
[DesqView is a registered trademark of Quarterdeck Office Systems.
Windows is a registered trademark of Microsoft Corp.]
2. How to start READ
--------------------
Simply specify one or more filenames on the command line, eg.
READ *.TXT *.DOC
One availabe switch is /S; if specified, READ takes its input from
STDIN rather than files. This allows you to 'pipe in' text:
DIR | READ /S
READ /S <text
If you didn't specify a unique file name (maybe you used wildcards), READ
offers you a list of possible files (max. 128, configurable), from which
you choose one with the cursor keys, PgUp, PgDn, Home, End, and Enter. Use
Del to remove files from the list, or add others with Ins (of course you
can give one or more templates at a time!). Abort READ with Q or Esc.
If you like to, you can sort the file list alphabetically or according to
file size. Just press A, Shift-A, S or Shift-S.
You can also select a file with your mouse. Hold down the left button, then
move mouse until the wished file is highlighted, then release the left button
(to lock the mouse) and press the right button. If you press both buttons,
READ quits.
Save the file data with W if you want to quit READ and continue reading later
on. READ notes down all chosen files, all your bookmarks and other info
(the charset you used, where you were reading, etc.) and allows you to read
back this info by pressing R.
If you call READ next time with /R on the command line, READ will
reload the previously saved file info.
There is another command line switch: '/M'. This switch makes READ
minimize its memory usage (well, READ does that anyway, but with this
switch the file table is never larger than 16 entries, no matter what
you specified in the config file). This is useful if you call READ from
another program.
3. How to move round in your text
---------------------------------
Use the cursor keys to scroll one line up/down or some characters left/right.
Ctrl & cursor left/right uses an alternate stepsize (see configuration).
PgUp/PgDn jumps one screen page up or down, Ctrl-PgUp/PgDn jumps to the
nearest formfeed character in the text or to the text start/end if there are
none. If you wish to jump directly to the text start/end, press Ctrl-Home/End.
Home/End does the same as with your full-screen editor: it aligns the screen
in a way that allows you to see the leftmost/rightmost character of the
longest line on screen. Q quits immediately, Esc takes you back to the file
selection.
A special feature is the space bar: it moves to the next formfeed character
if there's not more than one screen page to go; Otherwise, it acts like the
PgDn key.
You can also move round with your mouse. See the chapter on mouse
configuration.
Of course you can call DOS at any time: just press Alt-Z. Make sure you don't
install any memory-resident programs. EXIT takes you back to READ; READ
normally occupies 58k of memory when swapping to DOS (31k with a small
file table, but just 29k if you have XMS or EMS memory (eg. if you installed
HIMEM.SYS, EMM386.SYS or QEMM386.SYS).
Searching for a key-word? Press F to specify one; press N to search again. The
search is case-insensitive as long as you don't press Shift-F instead of F.
Do you wish to drop bookmarks? Of course you can! Use Alt-1 to Alt-0 to mark
positions within the text, then jump to those positions with 1 to 0.
READ remembers the current location and the bookmarks if you choose to read
another text in the meantime. Bookmarks are text-specific!
You want to jump to a specific line? Type G, then enter the line number. This
may take a while since READ must count the lines from the beginning of the
text.
If you type Shift-G, READ calculates the line number of the upmost line on the
screen and the total number of lines. With long files, this may take some
seconds.
Of course you can abandon functions that take a while by pressing Esc. If you
hit Q instead, READ quits immediately.
4. How to influence the text display
------------------------------------
Well, READ makes use of up to 48 screen modes that can be selected with
F1 to F12, combined with Shift, Ctrl or Alt, but they have to be defined first
(see later on).
Then you can freely choose foreground and background color: use < and > for
the foreground color and ( and ) for the background color.
Are there Tab characters within the text that don't refer to 8 colums margins?
Adjust the tab spacing with T and Shift-T.
Does your text make use of the ISO-8859-1 charset? Select a charset with C.
Is your text taken from the Usenet and coded ROT13? Type R.
Don't you like the elevator bar to the right? Toggle it on/off with E.
Your text is narrow compared to the screen wide? Indent or unindent with I
and Shift-I.
You prefer long lines to be wrapped-around rather than shifting the screen
window horizontally? Switch to wrap-around mode with W. Note that one line
is still one line internally, even if it is splitted into ten! But if
you put a line "W 0 1" in your config file, READ tries to estimate the
start of the screen lines in your text when you scroll back in wrap-
around mode (without putting you in it at first, of course).
5. Is that all?
---------------
No. READ is capable of printing, cutting and catenating text parts; charset
conversions and ROT13 are taken into account if you wish.
Type P to select Printing. Then select a start and an end (READ offers you
a list of salient points that can be used) and choose if the text in-between
is to be sent to a printer port or to be written/appended to a file. Of course
you can abort printing at any time with Esc. If you wrote the text to a file
that is not already in the file selection list, READ suggests it to be added.
Of course you may add or remove CRs...
6. Am I to remember all these keys?!
------------------------------------
No, of course not. Just one: H. It displays a help screen.
7. Well, READ is rather cute, but I don't like XXXXX.
-----------------------------------------------------
If XXXXX is a feature of READ, you can probably change it. READ has a config
file that's called READ.CFG (change this if you renamed the executable, eg.
if you renamed READ.EXE to LOOK.EXE you'll have to use LOOK.CFG). It's
normally located in the same directory as READ.EXE itself, but you may specify
another path using the environment variable READPATH=... (useful if several
users use different configurations, eg. in a network).
And this is what the .CFG file looks like:
Each line contains one of the following:
; comment line (not evaluated)
F x foreground color, hex (00-0F, default: 0)
B x background color (00-07/00-0F, default: 7)
Z xx color of file selection screen (two hex digits;
the first one specifies the background color
while the second specifies the foreground
color; default: 07)
M dd initial mode (eg. 1=F1, 11=F11 etc.)
V dd xxxx xx dd dd mode definition. See READ.EXA for details
O xx xx xx mouse settings (see below)
K d d d d Keyboard orientation: 1=normal, 2=inverted.
The first adjusts the cursor up/down keys,
the second adjusts the PgUp/PgDn keys
(0=normal, 1=QuickHelp, i.e. pressing an
operational key when help is being
displayed is effective to the text
display). The third digit sets the help
mode, and the fourth allows you to define
the operation of the Esc key during
text display: 0=normal, 1=if only one
file in the file list, exit immediately.
E d d=0: position display (elevator) off, 1=on
H dd dd Horizontal stepsize; 2nd value is
alternate stepsize (0-255, default 32 both)
T dd Tab spacing (0-16, default 8)
I dd Indent text (0-255, default 0)
X dd X scale with mouse movements (0-15,
default 5)
Y dd Y scale with mouse movements (0-15,
default 0)
C dd Charset (1=IBM, etc., as in the menue)
N cccccc... Default file templates (eg. '*.txt *.doc')
W dd Wrap-around (0=off (default), 1=on)
R d Restart search when EOF encountered. If 0,
the user is prompted; if 1, yes is assumed.
P d Show page boundaries (form feeds) (0=off,
1=double line (default), 2=female sign)
A d Automatically write filetable on exit if 1
(as if you'd press 'W' on the file overview
screen prior to exit) or not if 0
U dd File table size. min 1, max 128. Each
entry needs about 240 bytes of memory.
xx is a hexadecimal, dd a decimal number, and c is a character. Leading zeroes
can be omitted or added. Numbers are separated by spaces or tabs; spaces and
tabs are ignored where they aren't necessary. Upper-/Lowercase is of no im-
portance, and empty lines are allowed. Please regard that H, T, X, and Y allow
0 to be specified. T0 makes Tabs being ignored, X0 and Y0 select the highest
mouse speed possible. H0 switches off horizontal movements of the mouse.
8. Mouse operation
------------------
If and how mouse movements result in screen scrolls can be specified
by the user. It's possible to only allow scrolls in a certain direction
if special conditions are met (that is, left/right mouse button pressed/not
pressed and Shift or Ctrl key pressed/not pressed), and these
conditions don't have to be the same for all directions.
The "O" line in the config file specifies the details; it has this format:
O <vmode> <hmode> <bmode>
<vmode>: vertical mode, range 00-FF hex
<hmode>: horizontal mode, range 00-FF hex
<bmode>: additional button settings
<vmode> and <hmode> are hex numbers and work as follows:
Bit 0: 1=enable direction, 0=disable direction
Bit 1: 1=inverted scroll, 0=normal scroll
Bit 2-4: normal speed settings
Bit 5-7: high speed settings
Bit 2/5: 0=left button not pressed, 1=left button pressed
Bit 3/6: 0=right button not pressed, 1=right button pressed
Bit 4/7: 0=Shift or Ctrl not pressed, 1=Shift or Ctrl pressed
Slow speed has higher priority if settings for slow and high speed are
identical.
Note that Bit 1 of <bmode> overrides some scroll conditions if it is set.
<bmode> is a hex number:
Bit 0: 0=vertical fast scroll half page wise, 1=full page wise
Bit 1: 0=pressing both buttons has no special effect,
1=pressing both buttons does the same as pressing Esc,
no matter what the scroll conditions are.
Bit 2-7: no operation; set them to 0 for compatibility with future
releases.
For those of you who are not familiar with hexadecimal and binary
numbers, here's an example that should explain just as much as we need
here. Write down the bit setting you like, starting with bit 7 and ending
with bit 0, eg. "01000111". Then separate it into two halves, eg.
"0100 0111". Each half is represented in hexadecimal by one digit; use
this small conversion table:
0000 = 0 0001 = 1 0010 = 2 0011 = 3 0100 = 4
0101 = 5 0110 = 6 0111 = 7 1000 = 8 1001 = 9
1010 = A 1011 = B 1100 = C 1101 = D 1110 = E
1111 = F
So our example is "47" hex.
Some examples:
O 47 D7 2 This is the default setting. It means that pressing the
left button enables slow scrolling, pressing the right
button enables fast scrolling, pressing both buttons
simultaneously works like Esc. If neither Shift nor Ctrl
is pressed, the text is only scrolled vertically, while
it is only scrolled horizontally if Shift or Ctrl is
pressed. Moving the mouse seems to move a piece of paper
before your eyes.
O A5 C9 1 Pressing the left button enables vertical scroll, pressing
the right button enables horizontal scroll, and pressing
both buttons allows both scroll directions at the same
time. Whenever you press Shift or Ctrl with one or both of
the mouse buttons, this results in faster scrolls. Moving
the mouse results in text movements as if an imaginary
cursor would reach the screen border in a text editor.
Vertical fast scroll is page wise.
O 47 47 2 This is the default setting of old releases of READ.
9. Now how about those video modes?
-----------------------------------
You can define 48 different video modes which you can select with F1 to
F12 - combined with Shift, Ctrl and Alt. This is of special interest if your
graphics card offers extended text modes, which most VGA cards do. Just take
a look at your manual, there should be a table of such modes in it. You find
example definitions for several cards in READ.MOD. I've added a little
program called MODES.EXE that determines your graphics card's video
modes for you. See MODES.ENG for details.
A definition line consists of the following:
V F-key base address mode number horizontal vertical
eg. V 5 b800 3 80 25
V1-V12 equals F1 to F12, V13-V24 equals Shift-F1 to Shift-F12, V25-V36
equals Ctrl-F1 to Ctrl-F12, and V37-V48 equals Alt-F1 to Alt-F12.
That's enough for you? :)
Base address and mode number are hexadecimals! A base address of b800 should
be adequate in most cases (monochrome cards: b000).
Most EGA/VGA cards are capable of additional text modes that are often
not listed in the manual. READ activates them by manipulating the
charset size. Just try the following modes; if you don't get a picture
with the appropriate number of lines, that's bad luck. But it's most
likely that it works fine.
EGA:
V ?? b800 80 80 43
VGA:
V ?? b800 80 80 50
V ?? b800 81 80 28
Note: Replace the ?? by a decimal number between 1 and 48.
It's possible that if you have a monochrome monitor you'll have to use
b000 instead of b800 with these modes (e.g. with a PS2).
If a video mode that's definitely supported by your graphics card doesn't
work correctly this may be your monitor's fault. If it's not a
MultiSync or a MultiScan, then it's rather unlikely that all modes work.
If your graphics card offers text modes that are not listed in READ.MOD,
please tell me about them. I'll ship them with the next version.
10. My, this function is slooooow....
-------------------------------------
Probably it's a function that other browsers don't even offer used with a text
that other browsers can't process. For example, it can take up to one second
to find the rightmost character in a text with lines of up to 1000 characters
viewed in a high resolution display mode. But that should only happen on very
slow computers; on my old XT (10 MHz), READ is fast enough.
But there's one thing that can get on your nerves: if you don't have a cache
installed, READ makes intense disk access showing texts with very long lines.
This is due to the segmentation of the PC's memory and could only be avoided
on the cost of speed (in normal operation) and space.
Anyway, READ isn't slow at all! It's completely written in assembly language
that is highly optimized at critical points.
11. What does READ cost me?
---------------------------
READ is Shareware. That is: You may copy it as often as you want, you may give
copies to friends (as long as you copy READ completely and you get no benefit
from it; postage and other expenses: OK). READ is not to be delivered with
commercial products without my written consent! You are granted permission
to test if READ matches your requirements for a period of four weeks and to
add it to your archive. I also agree with uploading READ to BBSs or
ftp-sites etc. AS LONG AS IT IS NOT FOR PROFIT. (See remarks for SysOps in
SYSOP.DOC).
After four weeks you should have made a decision if READ is a program that
you'd like to use permanently. If yes, you have to register. A donation of
DM 5 (US $3 or other equivalent) should be OK for everybody and encourages
me to keep working on the program, add new functionality etc., and it gives
you the possibility to take influence on the development of READ since I'm
thankful for any suggestions.
12. And now for the usual: Disclaimer
-------------------------------------
READ has been carefully programmed and should not be able to do any damage
due to its structure. However, you are using READ at your own risk. I will
not be liable in any way for any damage on neither your hardware nor your
software. I also do not guarantee READ to fit for any purpose; you've got
four weeks to try and find out yourself. If you don't agree with these
terms, don't hesitate to delete READ right now!
13. How can I contact the author?
---------------------------------
Either by snail mail or by email.
My snail address is:
Christian Blum, Friedrich-Ebert-Str. 50, 66578 Heiligenwald, Germany
You want to call? Sure, it's your money. :) Dial +49 6821 632589, but
please make sure it's some decent time of day in Europe... eg. late
evening.
Or email to:
chris@phil15.uni-sb.de or chbl@stud.uni-sb.de
BTW: I also talk to non-registered users... since I want to convince you!