Dec 172017
 
A QWK Offline message reader interface for WWIV 4.20.
File QWK-051.ZIP from The Programmer’s Corner in
Category BBS Files
A QWK Offline message reader interface for WWIV 4.20.
File Name File Size Zip Size Zip Type
P-QWK.OBJ 16140 8592 deflated
P-QWK412.OBJ 15487 8301 deflated
QWK-MOD.412 2589 1064 deflated
QWK.DOC 15640 5797 deflated
QWK.OBJ 16181 8399 deflated
QWK412.OBJ 15452 8094 deflated
QWKINFO.MSG 1392 734 deflated

Download File QWK-051.ZIP Here

Contents of the QWK.DOC file



February 6, 1992 - Beta version 0.51 installation documentation.

A QWK Offline message reader interface for WWIV 4.20
(an unofficial 4.12 version is also enclosed)

QWK.OBJ - Turbo C + WWIV 4.20
QWK412.OBJ - Turbo C + WWIV 4.12

P-QWK.OBJ - Borland C / Turbo C++ + WWIV 4.20
P-QWK412.OBJ - Borland C / Turbo C++ + WWIV 4.12


ASSUMPTIONS AND INTRO:

This is a WWIV 4.20 source code modification, therefore, you must have (and be
able to recompile) the WWIV source code to incorporate this modification.
WWIV Source code is supplied only to registered WWIV users.

This will not work with versions of WWIV other than 4.20.

I do, however have a version that should work with 4.12 - although
this version has not been tested.

This will not work if you have modified your user record structures, or
message base record structures.

This may not work if other WWIV source modifications have changed the
parameters that the following internal WWIV functions expect:


config_qscan, describe_area_code, email, finduser, iscan, lcs, next_system,
nl, nsl, onek, pl, post, printfile, prt, QSCN, readfile, receive_file,
remove_from_temp, run_external1, send_file, sysoplog, wait1, yn

I will assume that you are familiar with the concept of offline readers,
and therefore, I will not delve into a detailed explanation.

I will also assume that you are familiar with the basics of C programming
and compilers. Because I'm lousy at writing user documentation, this may
not be a good project for a very novice C programmer.

Basically, this interface allows your users to download new messages, read
and reply to them offline, and then upload the replies. This gives your
users a much nicer environment to work in and saves them time. It also
reduces the amount of time each person is on your bbs - allowing for more
users per day to access the system.

I decided to create this interface because the .QWK format has become very
popular, even though it does not "fit" exactly with WWIV's message
structure.

With this modification, your users may use any one of the popular, and
excellent QWK message readers, like SLMR/OLX, EZ-Reader, BABBLE just
to name a few.


PROMISES AND GUARANTEES:

Because this modification is quite intensive, and represents a great deal
of work (compare the size of the enclosed .OBJ to other WWIV .OBJs, and
you'll get a rough idea of how big it is), I will not release the source
code at this time. I will assure you, however, that this code should not
damage any of your WWIV data files. The reader interface does not directly
write to any WWIV data files, except for the message read pointers. It
simply sets up the conditions, and calls the same internal WWIV functions
your system normally uses. I also promise that this interface will not
compromise the security of your system.

This interface has been operational on Abiogenetic BBS for some time.

This interface will work with 64 sub boards with WWIV 4.20.

Of course, like life itself, there are no guarantees. Use at your own
risk. You agree to assume all risks and liabilities that may arise from
this installation of this module.


HOW TO INSTALL (WWIV v4.20):

1) Copy the QWK.OBJ module to your directory that contains your .OBJ files.

2) Copy QWKINFO.MSG to your GFILES directory.

3) Modify your makefile or project file to include the QWK.OBJ file so it
gets linked when you compile your source code. (See your compiler &
linker reference manuals for more detail here).

If using Wayne's MAKEFILE.MAK:

#######################################################################
#
# Overlaid bbs files
#
BBS_OVL = \
batch.obj chnedit.obj defaults.obj diredit.obj gfiles.obj\
.....
voteedit.obj xferovl.obj xfertmp.obj xinit.obj qwk.obj
^^^
add

BBS_O_OVL = \
$(OBJ)\batch.obj $(OBJ)\chnedit.obj $(OBJ)\defaults.obj\
....
$(OBJ)\xfertmp.obj $(OBJ)\xinit.obj $(OBJ)\qwk.obj
^^^^^
add



4) The BBS needs to know of the new function, so add the following line to
your FCNS.H file:

/* File: qwk.c */
void qwk_reader();

5) The QWK interface needs some global variables in your system. Add them
to vars.h the variables to add are:

extern char qwk_title[81]; /* title to be passed */
extern int qwk_post; /* 0 = user posting with WWIVs editor */
/* 1 = user uploading QWK post */

Here's a snippet from my vars.h file:

...deleted...

#ifdef _DEFINE_GLOBALS_

/****************************************************************************/

char *ctypes[] = {
"IBM PC (8088)",
"IBM AT (80286)",
"IBM 80386/80486",
"IBM PS/2",
"Apple 2",
"Apple Mac",
"Commodore Amiga",
"Commodore",
"Atari",
"Other",
0L,
};

char ansistr[81], cdir[81], charbuffer[161], chatreason[81], crttype,
curspeed[81], dcd[81], dc[81], dszlog[81], endofline[81],
gatfn[81], irt[81], net_email_name[81], newprompt[161], odc[81],
search_pattern[81], ver_no1[51], xdate[9], irt_name[81], qwk_title[81];

extern int qwk_post;
extern char qwk_title[81];

int abortext, already_on, ansiptr, arcling, async_irq, base, bchanged,
change_color, charbufferpointer, chatcall, chatting, chat_file,
checkit, configfile, curatr, curdir, curdloads, curldir, curlsub,
cursub, c_dir, c_sub, daysmax, daysmin, defscreenbottom, dlf, do_event,
echo, edlf, endday, express, expressabort, flow_control, fsenttoday,
fwaiting, global_handle, global_xx, hangup, helpl, high_speed,
hungup, ihelp, incom, input_extern, in_extern, lastcon,
lecho, lines_listed, live_user, mailcheck, msgreadlogon, nextext,
noklevel, no_hangup, numbatch, numbatchdl, numchain, numed,
numextrn, numf, nummsgs, num_call_sys, num_dirs,
num_listed, num_ncn, num_sec, num_subs, num_sys,
num_sys_list, oklevel, okmacro, okskey, ok_modem_stuff,
oldx, oldy, ooneuser, outcom, restoring_shrink, screenbottom,
screenlen, screenlinest, smwcheck, statusfile, sysop_alert, tempio,
topdata, topline, two_color, userfile, usernum, useron,
use_workspace, using_modem, wfc, qwk_post;

... deleted text ...

/****************************************************************************/
#else
/****************************************************************************/

extern char *ctypes[];


extern char ansistr[81], cdir[81], charbuffer[161], chatreason[81], crttype,
curspeed[81], dcd[81], dc[81], dszlog[81], endofline[81],
gatfn[81], irt[81], net_email_name[81], newprompt[161], odc[81],
search_pattern[81], ver_no1[51], xdate[9], irt_name[81], qwk_title[81];

extern int abortext, already_on, ansiptr, arcling, async_irq, base, bchanged,
change_color, charbufferpointer, chatcall, chatting, chat_file,
checkit, configfile, curatr, curdir, curdloads, curldir, curlsub,
cursub, c_dir, c_sub, daysmax, daysmin, defscreenbottom, dlf, do_event,
echo, edlf, endday, express, expressabort, flow_control, fsenttoday,
fwaiting, global_handle, global_xx, hangup, helpl, high_speed,
hungup, ihelp, incom, input_extern, in_extern, lastcon,
lecho, lines_listed, live_user, mailcheck, msgreadlogon, nextext,
noklevel, no_hangup, numbatch, numbatchdl, numchain, numed,
numextrn, numf, nummsgs, num_call_sys, num_dirs,
num_listed, num_ncn, num_sec, num_subs, num_sys,
num_sys_list, oklevel, okmacro, okskey, ok_modem_stuff,
oldx, oldy, ooneuser, outcom, restoring_shrink, screenbottom,
screenlen, screenlinest, smwcheck, statusfile, sysop_alert, tempio,
topdata, topline, two_color, userfile, usernum, useron,
use_workspace, using_modem, wfc, qwk_post;

extern long hanguptime1, nscandate, this_date, timelastchar1,

...deleted text...

6) In BBS.C Create a new command from your (main) menu to call this
function, you need to assign it to an unused key, I use the "&" key. Like
this:

case 'Z': /* existing Z-scan command */
express = 1;
expressabort = 0;
l = thisuser.sysstatus;
if (l & sysstatus_pause_on_page)
thisuser.sysstatus ^= sysstatus_pause_on_page;
nscan(0);
express = 0;
expressabort = 0;
thisuser.sysstatus = l;
break;

case '&': /* QWK Reader Interface */ <= add this line
qwk_reader(); <= add this line
break; <= add this line

case '?': /* Existing '?' command */
if ((sysstatus_expert & thisuser.sysstatus))
printmenu(15);
break;

7) Now, we need to make some minor changes to the editor/posting functions
so the QWK interface can call it, and it it will use the qwk_title,
rather than prompting for it.

Edit msgbase.c, function inmsg.

Find your title prompt code, and modify it to appear like thus:

nl();
helpl=6;

if( qwk_post ) /* post from offline reader */
{
strncpy(title,qwk_title,59); /* copy qwk_title to the message title */
title[60] = 0; /* assure title is null terminated */
} else {
if (okansi()) {
prt(2,"Title: ");
mpl(60);
inputl(title,60);
} else {
pl(" (---=----=----=----=----=----=----=----=----=----=----=----)");
outstr("Title: ");
inputl(title,60);
}
}

...then a little further down...

if (fsed==1) {
save=external_edit("INPUT.MSG",syscfg.tempdir,(int) (thisuser.defed)-1,maxli);
} else {
save=exist(fnx);
if (save && !qwk_post) { /* <<= add this IF so user doesn't see it */
pl("Reading in file..."); /* say "reading in file" */
}
use_workspace=0;

8) Recompile your bbs. Because you've modified some of your header files
(.h files), the whole bbs should be rebuilt (make should do this
automatically). Your bbs should recompile without errors.

9) Copy your newly created BBS.EXE file to your bbs's main directory.

...and that's it!


Some usage notes:

You must have PkZIP and PkUnZip available in your path in order to create
or extract the packets!

To use the reader interface locally, here's what I do:

Log onto the BBS, and execute the reader. It will scan all the areas, and
build a .QWK packet. Then at the download protocol prompt, I shell to DOS
and copy the .QWK file sitting in the TEMP file area to another directory.
Then I return (EXIT) to the bbs, and select protocol 0 (don't download) -
which erases the .QWK packet from the TEMP area. I exit the bbs, and start
my offline reader, and read the .QWK file.

Known shortcomings and bugs:

-----
BUGS:

Time is not set correctly on messages in packets. (whoops!) (Date is OK)

Interface can be fooled by embedded "To: "'s when attempting to find who
this message was addressed to. (Mostly for WWIV systems that are part of
FidoNet)

Disables users pause-per-screen, and does not restore it upon exit.

ENHANCEMENTS:

Only works with public messages - can't send private e-mail replies yet or
read your private mail via the QWK interface.

Does not support SLMRs add/drop message area commands (configure q-scan).

Does not collect list of new files on bbs for insertion in packet.

Does not collect any bbs bulletins for packet.

Does not cut off lines beyond 80 chars on uploaded messages - which hurts
nothing, but can cause ugly line wrapping on quoted lines. (Tell your
users to reformat long paragraphs!)

Can collect more messages than user has time to download.

Does not have a feature to re-read (collect) already read messages. Only
collects new messages.

Will only support PkZip/PkUnzip - LHA/LZH support requested.

(If YOU discover bugs, please forward them to [email protected] (WWIVlink) so that they
can be corrected!)

-----

Otherwise, it works quite nicely, and is rather fast.

COMPILING:

For your information, the QWK.OBJ file was created with Borland C++ 3.0,
using the following command line:

bcc -O -Z -d -ml -r -N- -c -nobj qwk.c

Or... Turbo C 2.0, using similar options.

REGISTRATION AND LICENSE:

You are free to distribute or use the unmodified, unregistered .QWK
interface as long as you like. The unregistered .QWK interface will create
packets called DEMO-QWK.QWK and read uploaded DEMO-QWK.REP packets. Aside
from the creation of DEMO-QWK.??? files, there are no obnoxious begware
screens to annoy you or your users. However, if your users call more than
one system using the unregistered version of this interface, that may be
inconvenient for them. Please support shareware.

To register, send a check for $15.00 (to be used toward supporting the
operation of Abiogenetic BBS) payable to Barry Watson to:

Abiogenetic BBS c/o
Twin City System Operator's Association
Post Office Box 451
Circle Pines, MN 55014-0451

Be sure to include the name of the .QWK packets you would like to create
(up to 8 letters), and I will supply you with a key file that will be used
by the interface to create your packets. Beware - only one key file will
be supplied per donation.

In an effort to get your key to you as soon as possible, I will distribute
the key file via WWIVlink e-mail, if you are not part of WWIVlink, or
prefer that I mail you a diskette, please enclose a diskette with your
letter.

I truly hope you find this interface as helpful as my users and I do.

SUPPORT:

I will make a reasonable effort to support people using this interface, and
it is my intention to continue the development of this project (addressing
the shortcomings listed above). Of course, I will provide more support to
those who choose to register.

But, please understand, this is a hobby activity for me - not my career.

I may be contacted at WWIVlink [email protected] or FidoNet 1:282/113.
Abiogenetic BBS 612-489-7983. The bbs uses a US Robotics HST/DS modem.


WWIV QWK reader interface copyright 1992 Barry Watson all rights reserved.
WWIV code is the copyrighted property of Wayne Bell.
Borland run time routines are the copyrighted property of Borland Intl.

Jan 14,92 - Interface will now strip out 'To:' names on messages (mostly used
with FidoNet). 'To: User Name' must be on 1st line to be located.

Feb 04,92 - Ver 0.50
It was possible that the QWK interface expects a differently
named reply packet than the offline reader generates, depending
upon BBS system setup. Fixed.

-Now archive includes both C and C++ versions, and both
WWIV 4.20 and 4.12 versions.

Feb 06,92 - Ver 0.51
Revisit the above bug (reply files misnamed by the reader), it
was not fixed. This was due to a minor misunderstanding of the
QWK packet format.



 December 17, 2017  Add comments

Leave a Reply