/usr/share/doc/wp2x/HACKERSGUIDE is in wp2x 2.5-mhi-13.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | A Guide to making changes to WP2X.
Source files:
src/charsets.c - contains a table of equivalents to WP Corp/IBM
character sets. Currently only ISO-Latin1 is supported,
and there is no way to pick another character set.
src/charsets.h - structure definitions for above.
src/dopen.c - some file utility functions (mostly historical)
src/getopt.c - an implementation of the getopt(3) routines, use them
if you don't have getopt in your libc.
src/getopt.h - header for above.
src/patchlevel.h- records the version of the source
src/tokens.c - helper routines for token reader.
src/tokens.h - header for above
src/wp2x.c - main code
Notes: The code in wp2x.c should be split up into smaller pieces.
Routines of importance:
process_token:
Tokens come in five types: reserved, literal,
singleByte, fixedLength, varLength
The table of tokens is defined tokens.c. The codes are
taken from the WP technical reference manual.
Several support routines include:
ignoreByte, ignoreFixed, ignoreVar
These functions simple skip over an untranslateable
(or undefined) code.
outputToken:
Takes the output type from the third column and calls process0.
process0:
looks up configuration element types, and output the
right string defined in the configuration.
The attributeOn/attributeOff routines can call
generate calls to process0 as well.
More to be added.
|