Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Applies to: v10

v10 changes to this chapter: LAYER.H and 2030.H (the Btrieve-name compatibility macros this chapter relies on) are not in the shared v10 inc/ (a project-local LAYER.H exists in the ported modules, e.g. src/isv/mjwmut/), so only dfa*() names work unless you copy it; whether the GALPORT renames still compile against v10 is unverified. The EXPORT_* macros changed signature (chapter 29, section 29.5), BBSVER is now BBSVERS (server.h:61), and ffblk.ff_name is 260 bytes (FIOAPI.H:44). The const CHAR * section of this chapter is the WG3.2 view; the v10 version, with the v10 prototypes, is chapter 29, section 29.4.

Applies to: WG3.x

Editor's note: this chapter is new. It is not part of the Developer's Addendum for Worldgroup 3.12 (wg312dev); the addendum is silent on porting. It collects, for the WG3 layer, what happens when the WG1/WG2 source and the code printed in chapters 1-19 are built against the WG3.2 headers (/mnt/b/WG/WGDEV/INC). The sources are the kit utility GALPORT.C (SRC/devutils/galport, identical to the copy in this repository), the headers themselves, and the header-level deltas in analysis/deltas. Every file:line citation is to the WG3.2 headers unless it says "WG2" (/mnt/b/WG/WGSERV2/SRC). The symbols in this chapter were checked against the headers (see CROSSCHECK.md).

...

GALPORT.EXE ships in \WGDEV\BIN; the addendum's list of new utilities (chapter 21) does not describe it. Its banner reads "developer's utility to help developers port their add-on source code from Worldgroup v2.x to Worldgroup v3.x" (C. Robert, 4/27/96, $Revision: 3 $). Usage:

Code Block
GALPORT filename

The file is rewritten in place (through a work file GALPORT.OUT). The rules it follows, taken from the source:

...

  1. Show every read-only string parameter as const CHAR *; leave CHAR * only where the table above says the engine writes.
  2. For each function in the first table, the receiving variable is const CHAR *, or the result is copied with stlcpy(buf, p, sizeof buf) (GCOMM.H:409) before being edited.
  3. getfnm() returns NULL if the file does not exist (otherv3tov32 changes.txt).
  4. skpwht(), getasc() and fnmcse() are the only places where a string literal can still crash a module.
  5. GALPORT never touches constness: it renames char to CHAR, so const char * becomes const CHAR * correctly, unsigned char * becomes CHAR * (the defect noted above), and no const is added anywhere. The 3.2 prototypes must be compared by hand.

...

Previous: Major BBS v10: 27 Date and Time API  |  Contents  |  Next: Major BBS v10: 29 Major BBS v10