Offline Utilities
This section covers routines that are used in the offline utilities and nowhere else. The offline utilities also make use of several routines that are used for the online operator interface, starting on page 265.
...
See page 299 for what iniscn() does on monochrome screens.
Window Output: explode()
To make a window pop up on the screen, we use explode():
...
restore window #1
restore background
...
Monochrome Compatibility
...
To be compatible with both monochrome and color screens, you can call monorcol():
...
The color variable has a global effect on iniscn() and setatr() — if color is set to zero, those routines will translate color values into reasonable monochrome values:
Any attribute with a white background becomes black on white (inverse video). Otherwise, the attribute becomes white on black, preserving blinking and/or brightness if they are present.Window Input: edtval(), choose()
If you want the operator to enter something, you can use explode() to pop up a window (see the previous section), and then edtval() to handle his entry session.
...
When using validyn(), maxlen must be at least 4.
...
Multiple Choice
...
The following routine allows an offline operator to make a multiple-choice selection using a scrolling window, with up and down arrow keys highlighting the different choices, and enter making the final choice:
...
The jmp2chc() routine establishes the default or starting point, as does the first parameter in choowd(). The new routine dspchc() displays the background of the choice window after startup. Notice it’s polite to turn the cursor off for the choosing session. The hdlchc() routine handles operator keystrokes. Of course, you could set things up to be doing other things while kbhit() is false, and only call getchc() when kbhit() is true. The hdlchc() routine has the same return value as choose() and choout(), except it may return nchoices to indicate that the choosing session isn’t over yet.
Large Model Programming
Most offline utilities from Galacticomm use the Large memory model of Borland C++ and do not make use of the Phar Lap DOS-Extender. This is a less complicated development environment than what we use to make MAJORBBS.EXE and all the .DLL files. These .MAK files come with Worldgroup’s the Major BBS’s Client/Server Developer’s Kit:
...
Look in the corresponding .MAK file for the utility for the exact way to link it.
Language Editor .DLLs
When you define a language, you can also define a custom editor program for editing text or other information in that language. Usually a custom editor will be associated with the protocol portion of the language, for example WGSDRAW for all languages that end in /ANSI, or RIPaint for all /RIP languages.
...
6. Install your .DLL file, and the language .MDF file, on the Worldgroup Major BBS server computer where you want the editor to be available.
.MSG File Reading and Writing
If your offline utility needs to examine the value of a CNF option direct from the .MSG file, as opposed to the compiled .MCV file, you can use msgscan().
...
setcnf("GROUP3","MODEM");
setcnf("BAUD3","19200");
setcnf("LOCK3","YES");
setcnf("INIT3","AT&FE0S0=0S2=255X6&R0B1");
setcnf("SUPCLS","PROSPECT");
applyem("BBSMAJOR.MSG");
applyem("BBSSUP.MSG");When you bring the Worldgroup Major BBS server up again, new .MCV files will automatically be generated by WGSMSX.
...