Category : C Source Code
Archive   : TCXLV103.ZIP
Filename : V.TXT

 
Output of file : V.TXT contained in archive : TCXLV103.ZIP
V.C
---

V.C is a file viewer written to demonstrate how TCXL 5.5 can be used
in a real-world application. The program makes full use of TCXL's
new coding conventions. Its features include: a file-picking window;
four-way scrolling; searching (case-sensitive and case-insensitive);
settable tabs; goto line number; and on-line help.

Included files:
V.C source code for Turbo C/C++
V.EXE executable
V.ASC ASCII text for help screens
V.HLP compiled help screens
V.TXT this file

Usage: v [-tn] [filespec]
where n is the tab width for the file display. The filespec is
optional; if it is omitted, the user is prompted for a filename. If
the filename contains wildcards (? or *), or if the user presses
[Enter] or [Esc] without entering a filename, a file-picking window will
pop up.

There is a help screen for each part of the program, accessible by
pressing [F1] at any time. Also, pressing [Alt-X] at any time
(except when viewing a help screen) will cause the program to quit.

When viewing a file, the following keys are active:

Key Function
--- --------
F1 Help
Esc/Alt-X Quit view window
Home Beginning of file
End End of file
UpArrow Scroll up one line
DownArrow Scroll down one line
LeftArrow Scroll left one column
S-LeftArrow Scroll left to first column
RighArrow Scroll right one column
PgUp Scroll up one screen
PgDn Scroll down one screen
Tab Set new tab width
F3 Search (case-sensitive)
F4 Search (case-insensitive)
F2 Search again (using previous
search string and case-sensitivity)
F5 Goto line

V is fast and functional, but definitely has room for improvement in
several areas: it will only read as much of a file as it can allocate
memory for; also, it reads the file in all at once, so there is a delay
before you can navigate in the file. I intend to address this design
flaw in the near future.

Changes in version 1.01:
-----------------------
o Tab-expansion handling has been fixed, so that long expanded lines
will never wrap or overwrite the window border (thanks to Ed Girou
for pointing this out).
o A command-line parsing bug has been fixed (if you used the '-v'
switch without an argument, bad things would happen).

Changes in version 1.02:
-----------------------
o I added validation to the function that gets a new tab setting from
the user; this fixes a bug that resulted if the user pressed Enter
in the empty input field (thanks to Ed Girou again--gettin'
to be a real nuisance there, Ed!).
o When I fixed tab expansion, I forget to apply the fix the the
function that displays a found search string; this is now fixed.
o Fixed a bug that prevented the rightmost column in the
window to be used.
o Fixed a bug related to horizontal scrolling.
o Another change, not a bug fix, was to replace almost all calls
to Wputs() to Wprts(); since I'm doing my own tab expansion, I no
longer need the tab expansion (or any other translation) built
into Wputs(). Besides, Wprts() is smaller, presumably faster,
and eliminates the need to call Wgotoxy().

Changes in version 1.03:
-----------------------
o The program now looks through the path to find the help file.
o Unix-style text files (LF instead of CR/LF) are now properly
shown.
o I added validation to the search prompt, so that the request
is ignored if the user Esc's out, or presses Enter in the
empty field.
o I cleaned up the display of the line where found text is
located.
o I changed horizontal scrolling a little so that the user can
always scroll to the right, just like LIST et al.
o Various other cleanups, mostly ones that are invisible to
the user.

V was written by Dave Seidel. V.C and V.ASC are Copyright (c) 1990
David A. Seidel. V is freeware; you are welcome to use and
distribute these files as long as you don't charge any money for
them. I am interested in your feedback, code fixes, improvements,
etc. My CompuServe ID is [71511,2217]. You can send me Cmail, or
leave messages in PCVENC, section 6, or BPROGB, sections 3 or 5.



  3 Responses to “Category : C Source Code
Archive   : TCXLV103.ZIP
Filename : V.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/