home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
arc_lbr
/
aview38.arc
/
AVIEWCOM.DOC
< prev
next >
Wrap
Text File
|
1990-01-27
|
35KB
|
783 lines
_____________________________________________________________________
AViewCom.Exe Version 3.8, 4.4 01/27/90
Archive View to Console and Com port
CopyRight (C) 1989, 1990 by Cygnus Data Systems
Daniel A. Durbin
_____________________________________________________________________
Contents
--------
Description ........................ 2
Operation .......................... 2
Files .............................. 3
Setup .............................. 4
Syntax ............................. 4
AVIEWCOM /C (create CALLINFO.BBS)... 9
AVIEWCOM /S (Setup Menu)............ 9
AVIEWCOM /U (User Update)........... 10
Command Priority ................... 11
Display Files .......................11
Configuration File ................. 12
Exit Codes ......................... 13
Credits and Acknowledgements ....... 13
Disclaimer ......................... 14
Bugs ............................... 14
Future ............................. 14
History ............................ 15
AViewCom 1
DESCRIPTION
-----------
AViewCom was inspired by the ArcView function in Perspective
Data Systems by Carey Nash. Although the code for AViewCom
is completely my own, most of what I know about C was learned
through modifying the source code for Perspective.
AViewCom allows BBS callers to view archive contents, read
ASCII files within archives, and download any file from within an
archive. Callers may also create a temporary archive containing
any number of files from the original archive. AViewCom supports
.arc, .pak, .zip, .zoo, .lzh, and some .exe and .com archives.
AViewCom is written specifically with WildCat BBS in mind since
WildCat has a [V]iew Archive file function in the files menu which
makes a call to an external arcview program and passes the caller's
specified filename to VIEWCOMP.BAT as a DOS parameter %1. However,
AViewCom may be used with other BBS's since if no filename is
specified, AViewCom will prompt the caller for the full pathname to
the archive file. A configuration file may be used to specify
directories to be searched for the file.
OPERATION
---------
AViewCom may be run directly from the command line. Simply specify
the full pathname to the archive to be viewed. You should try this
before adding AViewCom to your BBS. The screen will clear and prompt
you for ANSI display. After answering, the contents of the archive
will be displayed, and a command line prompt will appear.
Then try adding it to your BBS. If you're using WildCat, modify
your VIEWCOMP.BAT file to read: AVIEWCOM %1 COM1. Once you're sure
this is working okay, you may add other options, such as reading
caller information from the CALLINFO.BBS, a file which may be created
with AVIEWCOM /C. Add the command AVIEWCOM /C to your VIEWCOMP.BAT
file before it calls AViewCom and include the '-w' parameter on the
AViewCom command line. For example:
AVIEWCOM /C
AVIEWCOM %1 COM1 -W
AViewCom 2
Notice that case is not significant in command line parameters.
Once all this is working, you may wish to further review
the other options that are available as specified in the SETUP
section of this documentation. If you have any trouble, start with
things as simple as possible. Then add options one at a time and
verify that each is working properly. Also, take time to read all
options and review all files included in this archive package.
Review the files included and delete ALL that are not
applicable to your configuration. Most WildCat systems can use the
VIEWCOMP.BAT file included. Review the syntax listed below to
select options for your system. You may choose to specify all
options on the command line, OR use AVIEWCOM /S, OR specify them
in the AVIEWCOM.CNF file, whichever is most comfortable for you to
use. However, if you use the command line for specifying options,
please delete the .CFG and .CNF files to reduce confusion. If you
use either the .CFG or .CNF file, do not use the command line
options.
FILES
-----
AVIEWCOM.CNF A sample configuration file
AVIEWCOM.DOC This file
AVIEWCOM.EXE The ArcView program
AVIEWCOM.HLP Displayed when caller requests [H]elp
AVIEWDSZ.BAT How to use batch file to call DSZ
DIGIFONE.TXT A Telephone Answering System Ad
VIEW.OVL The ArcView overlay program
VIEWCOMP.BAT A sample batch file for WildCat
WHATSUP.DOC Information on the latest haps
Not Included:
AVIEWCOM.SCR Welcome screen for ANSI callers
AVIEWCOM.BBS Welcome screen for MONO callers
AVIEWCOM.CFG Created when using AVIEWCOM /S
AVIEWCOM.LOG Activity log for AVIEWCOM.EXE
AVIEWCOM.USR Saved user download information
AVIEWTMP.??? Temporary archive used during downloading
AVIEWDSZ.ERR (see AVIEWDSZ.BAT)
AVIEWCOM.DAT Created and erased by AVIEWCOM.EXE
AViewCom 3
SETUP
-----
- Setup Procedure and Information:
AViewCom will display the contents of an archive to the local
console and to COM1, COM2, COM3, or COM4 as specified on the
command line. If no COM port is specified, AViewCom enters the
local mode and no output is sent to the COM port. When displaying
a text file, AViewCom makes a DOS call to an external extractor
which may be anywhere in the DOS path. An extractor other than
PKUNZIP (the default) may be specified with the '-e' option. The
SysOp may specify a temporary path to extract files to with the '-p'
parameter on the command line. AViewCom can display ANSI color.
If the '-a1' parameter is included on the command line, the
contents are displayed in color locally and to the remote caller.
If ANSI is selected, an ANSI device driver is required for the host
computer. However, a color monitor is not required. You must have
a line in your CONFIG.SYS file resembling the following:
DEVICE=C:\DOS\ANSI.SYS
If an ANSI driver is not installed and ANSI is selected the display
will be cluttered with ANSI escape sequences.
AViewCom will allow BBS callers to read text files that are
contained within an archive file. AViewCom will not display files
with .com, .exe, .obj, or .ovl extensions. The file is also checked
for nul characters contained within the first 255 bytes of the file
and will not display it if there are any. If the file passes the
tests, it will be extracted by making a DOS call to an external
extractor which must reside somewhere in the DOS path (which
includes the current directory). The file is then extracted to the
current directory or temporary path, displayed, and deleted.
However, if the file already exists before the call to the
extractor, it is displayed, but not deleted.
AViewCom will allow BBS callers to download any file that is
contained within an archive file. AViewCom makes a DOS call
to DSZ.COM which may be anywhere in the DOS path (which
includes the current directory). The file is then extracted to
the current directory or temporary path, transfered, and deleted.
However, if the file already exists before the call to DSZ.COM,
it is sent, but not deleted. Including '-d' on the command
line disables the downloading feature.
AViewCom 4
SYNTAX
------
Some special features of AViewCom are invoked by using ONE of
the following special parameters.
AViewCom [?] [/C] [/S] [/C]
? If first and only parameter, displays syntax help screen.
/C If first and only parameter, creates the CALLINFO.BBS file.
/S If first and only parameter, inovkes the setup menu.
/U If first and only parameter, updates the WildCat v2.0
database files (available on AViewCom v4 only).
In the arcview mode, AViewCom accepts the following parameters on
the command line. Each is detailed below.
AViewCom file [port] [-a#] [-c] [-d] [-e#] [-l] [-p{tpath}] [-t#] [-u] [-w]
file is a required parameter. If omitted, there must be
no other parameters on the command line and the caller
will be prompted for a file to an archive file. file
is any valid DOS pathname to the file to be viewed.
The archive extension is optional and is added if not
included. Some BBS's like WildCat! pass the file
as a DOS parameter. WildCat! uses %1. If the character
'*' use used as file, other options may be specified
and the caller will be prompted for a file to view.
port is either 'com#' or 'local' where # is 1, 2, 3, or 4.
This is an optional parameter and defaults to local.
If neither of these are specified, local mode is entered
and no transmission is sent to the com port. In this
manner, AViewCom may be run in the local mode.
-a# is an optional parameter where # either 0, 1, or 2:
0 = no ANSI. In this mode, all display is MONO.
1 = ANSI color. All display is in ANSI color.
2 = prompt caller for ANSI color or not (default).
AViewCom 5
-c If -c is included on the command line, AViewCom will search
through directories that are listed after the #search
command in the AVIEWCOM.CNF file. This option is included
for non-WildCat systems which do not pass the filename to
view as a DOS parameter.
-d disables the download option. This is included for those
systems which prefer not to allow downloading. If not
included, downloading is enabled and DSZ.COM must be
somewhere in the DOS path. Protocols supported are
XmodemCRC, YmodemBatch, and Zmodem.
-e# Used to specify an extractor where # is as follows:
0 pkxarc.COM (NOT EXE!)
1 pkunpak
2 pak e
3 arc e
4 pkunzip [default]
5 zoo
6 lharc
If you use code 2, make sure that PAK.CNF is such that
the archive will not be deleted after extracting it. The
specified extractor is also used to create the temporary
archive which is assigned the name AVIEWTMP.
AViewCom 6
-l enables activity logging. If this is included,
AViewCom will create and maintain an activity log called
AVIEWCOM.LOG which will contain dates and times of
all arcviews and downloads that occur.
The call to DSZ will contain port number, protocol
(either sx, sb, or sz), and the filename. %1="port",
%2=port number, %3=protocol (sx, sb, sz), %4=filename
If you wish to include other options on call to DSZ.COM,
you may do so in a batch file, BUT IS NOT REQUIRED!
To do this, you must "set" the pathname to this batch
file as a DOS environment string.
set AVIEWDSZ=pathname
where pathname is the full path to the batch file
you have created to call DSZ.COM from (for an
example, see AVIEWDSZ.BAT) AViewCom will look for
the AVIEWDSZ string in the environment and call
the batch file through a DOS system call. The
batch file should create a file called AVIEWDSZ.ERR
DSZ returns an errorlevel greater than 1. AViewCom
will delete AVIEWDSZ.ERR after checking for its
existance.
tpath is an optional parameter and if omitted, defaults
to the current working directory. tpath is any
valid DOS path and specifies a temporary directory
for the external extractor to use when extracting files.
A useful tpath is a ramdrive. The '-p' indicates
that a DOS pathname follows.
-t# This parameter allows the SysOp to specify a maximum
number of minutes that the caller will be allowed to spend
in a session of AViewCom. # is the number of minutes
to be allowed. In the WildCat mode, the time allowed
is read from CALLINFO.BBS.
AViewCom computes file transfer times as if the file
were transfered at 95% efficiency. If the caller does
not have enough time left for the file transfer, he
will not be allowed to download the file.
AViewCom 7
-u if included, instructs AViewCom to create a file called
AVIEWCOM.USR which will contain the number of files and
kilobytes the caller downloaded during the current session
of AViewCom. When AVIEWCOM /U is run, the WildCat databases
will be updated (FILESEC.DAT and USERFILE.DAT) to reflect
the number of downloads and total download kbytes. However,
AVIEWCOM /U must be run after the caller logs off and before
midnight of the current day.
Available only for WildCat v2.0! and AViewCom v4.
Version 3 of AViewCom does NOT write any information
to USERFILE.DAT or FILESEC.DAT. Version 4 does update
the databases and is available only to registered users.
-w Read the CALLINFO.BBS file for caller information.
With this option, the CALLINFO.BBS file is read for
caller information and the caller's download ratio and
number of downloaded kbytes are checked. The caller will
not be able to download files if the ratio has exceeded
the values on CONFIGWC.BBS. If CONFIGWC.BBS does not
exist, the upload/download ratio is set to 1:20.
AViewCom will search the current directory for
CALLINFO.BBS and CONFIGWC.BBS. If you operate AViewCom
from another directory, you will need to copy these two
small files to that directory before calling AViewCom.
AViewCom 8
AVIEWCOM /C (Create the CALLINFO.BBS file)
-------------------------------------------
WildCat does NOT create the CALLINFO.BBS file when the caller
selects the [V]iew Archive function from the files menu. AViewCom
will create this file when invoked with the /C parameter. It will
then search the ACTIVITY.LOG to determine who the current caller is
and the baud rate or if the caller is on locally. The USERFILE.DAT
file is then searched for the caller's record and the information is
read. It then reads CONFIGWC.BBS to get the system default settings.
This information is then used to create CALLINFO.BBS. This program
will ONLY work with WildCat v2.0. I will update it as new versions of
WildCat are released.
AVIEWCOM /S (SETUP MENU)
-------------------------
AVIEWCOM /S is provided for convenience only and is not required.
Normally, options are specified on the command line. AVIEWCOM /S
allows you to store your default options in the AVIEWCOM.CFG file.
If you choose to use AVIEWCOM /S, you should not specify other
options on the AVIEWCOM command line.
The default settings are:
setup.port = 1; COM1
setup.ansi = 0; MONO
setup.cnf = 0; NO .CNF FILE
setup.down = 1; ALLOW DOWNLOADING
setup.extractor = 4; PKUNZIP
setup.log = 0; NO CALL LOGGING
getcwd(setup.tpath, 80); CURRENT WORKING DIR
setup.left = 45; 45 MINUTE TIME LIMIT
setup.wildcat = 0; NOT WILDCAT
setup.update = 0; DON'T CREATE AVIEWCOM.USR
AViewCom 9
The binary configuration file AVIEWCOM.CFG is created using
AVIEWCOM /S which is self explanitory. The command line options are
summerized in AVIEWCOM.DOC and will be listed by typing AVIEWCOM ?.
Only comm port, caller ansi status, and caller time left options
are determined from CALLINFO.BBS. The text file AVIEWCOM.CNF is
provided for NON-WILDCAT systems, but may also be used by WildCat
systems and may be edited with any ASCII editor. The options are
outlined in AVIEWCOM.DOC and a sample AVIEWCOM.CNF file is
provided. Remember that the commands entered in AVIEWCOM /S will
be overrided any listed in AVIEWCOM.CNF, the command line, and in
CALLINFO.BBS.
AVIEWCOM /U (UPDATE DATABASES)
-------------------------------
AViewCom will now save information on the caller's downloading
activity. If the caller has downloaded anything, the number of
downloads and the download kbytes are saved in a file called
AVIEWCOM.USR which is used by AVIEWCOM /U to update the WildCat
databases. AVIEWCOM /U must be run while no one is online. It
should be run directly after the caller logs off the system. This
may be accomplished by running a daily event BEFORE midnight or
by dropping to errorlevel 60 after each caller. I wanted to be able
to update the caller's information after exiting AViewCom but before
returning to WildCat but WildCat will overwrite the updated
information if I do it that way. So the best I can do is wait until
the caller logs off. WildCat v3.0 will alleviate this problem.
There are 4 bits of information that are updated:
DailyDL
DailyDK
Downloads
TotalDK
If AVIEWCOM /U is run on the next calendar day from when the caller
downloaded from AViewCom, DailyDL and DailyDK are not altered.
AViewCom 10
Several problems have been brought to my attention regarding
AVIEWCOM /U. Since there are multiple files to deal with, and
multiple different places they may be found, I'll include these
suggestions. Run AVIEWCOM from its own directory. For example,
C:\WILDCAT\AVIEWCOM. The AVIEWCOM.USR file should be created
and found in that directory. When you run AVIEWCOM /U, run it from
that directory, but include the pathname to CONFIGWC.BBS on the
command line. AVIEWCOM /U will read it and determine the pathnames
to the USERFILE.DAT. To summarize:
You MUST Run AVIEWCOM /U from the same directory as AVIEWCOM.
Enter the pathname to CONFIGWC.BBS on the command line. ie:
AVIEWCOM /U C:\WILDCAT\CONFIGWC.BBS
PRIORITY
--------
AViewCom will accept options from (low to high priority):
lowest: 1) defaults
2) a binary configuration file (AVIEWCOM.CFG)
3) the command line
4) callinfo.bbs (port, ansi, timelimit only)
highest: 5) a text configuration file (AVIEWCOM.CNF)
The lowest priorty option settings are overwritten by the highest
option settings. If you don't need the AVIEWCOM.CNF file, delete
it. Most systems can do without it. It is mainly included for
non-WildCat systems to list directories to search for the file.
For WildCat systems, you should be able to list all of the options
you need on the command line.
DISPLAY FILES
-------------
These files are not required, but if they exists, will be displayed.
AViewCom.hlp Displayed when the caller requests [H]elp
AViewCom.scr Welcome screen, ANSI color version
AViewCom.bbs Welcome screen, monochrome version
AViewCom 11
CONFIGURATION FILE
------------------
If the file AVIEWCOM.CNF exists, options will be read
from a configuration file. The configuration file may
contain ';' to indicate comments. The rest of the line
after the ';' is ignored. Lines beginning with '#' are
command lines. Recognized commands are:
#search ;search directories
#paths ;paths to search
#port ;com port
#video ;ANSI or MONO
#temporary ;extracting directory
#extractor ;type of extractor
#nodownload ;disables downloading
#log ;enables activity log
#timelimit ;max minutes allowed
#update ;create AVIEWCOM.USR
#wildcat ;read CALLINFO.BBS
After each command line, another line begins containing
options for the last command. The paths command is used
to specify directories to search for the requested
archive file. There is no limit to the number of
directories which may be searched. See the included
AVIEWCOM.CNF file for further information.
AViewCom 12
EXIT CODE
---------
A DOS errorlevel of 1 is returned when an error in command line
parameters is encountered, or upon any error during execution.
AViewCom monitors carrier detect and returns a DOS errorlevel
of 2 upon loss of carrier detect. It also monitors keyboard
inactivity. If no keyboard activity occurs for 3 minutes while
waiting at a prompt, AViewCom exits with a DOS errorlavel of 3.
CREDITS & ACKNOWLEDGEMENTS
--------------------------
AViewCom was inspired by the ArcView function in Perspective
Data Systems by Carey Nash. Original versions used his code,
but have since been replaced by my own. AViewCom version
3 may be freely distributed but may not be sold for any
reason. AViewCom version 4 may NOT be distributed and may
only be used on one system per registration.
The comm port communications are interrupt driven. The original
interrupt request vector is saved and replaced with a local
interrupt service routine. The original ISR is replaced on exit.
For ordering information, please see the file ORDER.FRM. If
you choose to order AViewCom, you will receive the latest version
of the program, and a printed manual. In addition, I will be able
to continue to support AViewCom and provide additional features and
enhancements. See future below.
Daniel Durbin
6216 Agee Street #124
San Diego, CA 92122
(619) 457-2532 (voice)
(629) 457-2665 (data)
AViewCom 13
DISCLAIMER
----------
THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE AUTHOR WILL NOT BE LIABLE TO USERS
OF THIS PROGRAM FOR ANY DAMAGES, INCLUDING LOST PROFITS OR
LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES,
ARISING OUT OF USE OF THIS PROGRAM.
BUGS
----
AViewCom will not work with DesqView unless direct screen writes
are allowed. The archive pathname is limited to 48 characters.
The temporary pathname is limited to 48 characters.
The re-list archive filenames function is limited to 255 filenames.
FUTURE
------
Version 4 updates WildCat's file and caller databases
to reflect the number of downloads made and limit the number of
downloads permitted. Version 4 is available only to
registered users.
I am working on adding more file transfer protocols.
All suggestions are welcome and encouraged and may be mailed,
emailed or phoned to me anytime. This is a continuation of AViewCom
and many enhancements and improvements will be added and supported.
I thank all those who have given me feedback and encouragement.
If enough copies of AViewCom are registered, I will implement the
above features and enhancements, but I can not if you choose not
to register your copy of AViewCom.
Cygnus X-1 BBS is moving to San Diego, CA and will be down during
the month of January, 1990 until the new phone is installed. US Mail
may be sent to the San Luis Obispo, CA Post Office Box (see ORDER.FRM).
AViewCom 14
HISTORY
-------
Version 1.1 06/21/88 Added carrier detect check so that an
errorlevel 1 is returned and the program
is exited upon loss of carrier.
Added a local feature that inhibits output
to the com port if the string local is found
anywhere on the command line.
Version 1.2 06/27/88 Added internal interrupt driven comm port
interrupt service routines since WildCat
disables comm port communications during
a call to arc_view function.
Version 1.3 06/30/88 Fixed interrupt vector bug in internal
interrupt driven service routine.
Version 1.4 01/22/89 Fixed divide by zero error upon encountering
an unknown storage type.
Added detection of Crunched and Crushed
stowage types.
Completely revised the modem/console
i/o routines.
Version 2.0 01/23/89 Added option to read text files
within an archive.
Version 2.1 01/31/89 Made the default mode local.
Added temporary extraction pathname.
Version 2.2 02/07/89 Added the ability to download selected
files within an archive. Made two status
lines to accomodate longer pathnames.
Version 2.3 02/11/89 Extended number of possible filenames in
archive from 128 to 255. Fixed problem
of negative numbers being assigned to
filenames.
AViewCom 15
Version 2.4 02/19/89 Removed Carey Nash's arcview code and
replaced it with my own which was derived
from descriptions of archive file headers.
Added support for zipfiles and .pak files.
Added ability to mark files and copy them
to a temporary archive for downloading.
Version 2.5 02/19/89 Added activity log. Added ability to
specify directories to search by reading
a configuration file. Removed the system()
calls and replaced them with spawnlp(). The
result is smaller memory requirement and
faster operation.
Version 2.6 03/04/89 Added feature to disable the activity log.
Added option to call dsz from a batch file
by putting the path to the batch file in
the environment.
Version 2.7 03/11/89 Added option to ask for another filename to
view when using the /c parameter. Fixed the
incorrect CRC display with .zip and .zoo files.
Version 2.8 03/18/89 Aviewcom now searches through WildCat's
Activity.log file to determine who is online.
Version 3.0 03/26/89 Removed the 'search activity.log' feature
and replaced it with a 'read CALLINFO.bbs'
feature. AViewCom uses the information in
CALLINFO.bbs to limit the number of downloads
and the number of download kbytes.
Added LHARC (.lzh) format.
Version 3.0b 04/01/89 Updated AVIEWCOM.DOC to reflect more changes.
Added AViewCom.scr as welcome screen. Fixed
lzhview to prompt for more after 23 lines.
Version 3.0c 04/07/89 Repaired lzhview to re-list archive filenames
correctly and included lharc as option in
aviewcom.cnf file. Fixed problem with first
character of filename being displayed as
graphic character when it should be a number.
Added feature to retry download on error.
AViewCom 16
Version 3.1 04/10/89 Repaired some bugs in the lzhview() function.
Packed some of the code into smaller segments.
Updated the CALLINFO.COM program to eliminate
lockups under some conditions.
Version 3.2 04/13/89 Fixed bug that cause "cannot send \.zip"
message when attempting to download
aviewtmp.zip.
Version 3.3 07/19/89 Fixed many lockup problems associated with
memory corruption by splitting AVIEWCOM into
two programs and using an overlay scheme.
Version 3.4 09/30/89 Added support for Pkzip v1.01
Version 4.0 09/30/89 Added support for WildCat v2.0. Added feature
to update WildCat's file and caller databases to
reflect the caller's number of total downloads
and total download kbytes.
Changed call logging to default to off.
Changed default extractor to PKUNZIP.
Version 3.5 10/06/89
Version 4.1 10/06/89 Added support for self-extracting archives.
Added support for PAK v2.10.
Fixed MONO comming up in ANSI problem.
Version 3.6
Version 4.2 12/01/89 Fixed rare bugs, including ANSI/MONO problem.
Version 3.7
Version 4.3 12/15/89 Incorporated the functions of AVUSER.COM,
AVSETUP.COM, CALLINF2.COM into AViewCom.exe
Daniel Durbin___________________________________________________
SysOp: Cygnus X-1 BBS | CIS: 73447,1744
(619) 457-2665 (data) | GEnie: D.DURBIN
AViewCom 17