coders.guide
muddy/doc/coders.guide · 25.9 KB
From the archive astrum.tar.bz2
Download the archive « Back to the archive contents
$Id: coders.guide,v 1.4 2003/06/24 02:47:33 sg Exp $
CONTENTS
========
INTRO Common declarations and considerations
PART I Naming conventions
PART II Basic types (low-level types)
string (const char *)
`mlstring' (multi-lingual strings)
`varr' (variable-size array)
`hash_t' (hashed array of varrs)
`memchunk_t' (memory allocation unit)
`module_t' (module info structure)
Utility structures and functions
PART III SoG general data structures
class_t
clan_t
skill_t
race_t
material_t
PART IV SoG object structures
CHAR_DATA
PC_DATA
NPC_DATA
MOB_INDEX_DATA
OBJ_DATA
OBJ_INDEX_DATA
ROOM_INDEX_DATA
AFFECT_DATA
PART VII Game flow
Main game cycle
Time profiles
PART VIII Multi-lingual capabilities and translation.
Language specifications
Message database
Rules: cases, genders, quantities
Rules: explicit, implicit
PART IX Text output
Basic output routines
Text buffers
Advanced output (act-like functions)
PART X Modules
`core' module
`dofun' module
`events' module
`olc' module
`spellfun' module
PART XI On-line creation (OLC)
Table for OLC commands
OLC command subfunctions
OLC editors
OLC validators
How to add an OLC editor
PART XII Data loading (DB)
PART XIII Compatibility issues
AFTERWORD.
INTRO. COMMON DECLARATIONS AND CONSIDERATIONS.
----------------------------------------------
This manual serves to simplify SoG code development and describes
structures, functions and some `how-to' methods used in SoG code.
Formatting style is fully described in 'man 9 style' (FreeBSD).
PART I. NAMING CONVENTIONS.
---------------------------
SoG-specific data types should be named as xxx_t.
Data types initializing/deinializing functions must be named as
(for type `xxx_t'):
xxx_t *xxx_new(void)
void xxx_free(xxx_t *)
if xxx is allocated dynamically via `malloc' or `varr_enew'
or:
void xxx_init(xxx_t *)
void xxx_destroy(xxx_t *)
otherwise.
Many routines use callback functions to iterate through varr or
hash (see Part II, Basic types). These functions are named like
`xxx_cb'.
E.g.:
typedef struct module_t module_t;
AFFECT_DATA *aff_new();
void aff_free(AFFECT_DATA*);
void mlstr_init(mlstring *ml, const char *mval);
void mlstr_destroy(mlstring *ml);
void *varr_destroy_cb(void *p, void *d);
PART II. BASIC TYPES
--------------------
string
======
Never use the following functions: strcpy, strcat, strncat, *sprintf
Use strnzcpy, strnzncpy, strnzcat, strnzncat and *snprintf instead.
Strings are read-only (with reference counter) and hashed.
String hasher is based on Peter K. Pearson's article in CACM 33-6,
pp. 677.
`str_empty' is declared to use instead of "" or NULL strings
(actually, `str_empty' is equal to "" string).
const char*
str_dup(const char* s);
`str_dup' puts `s' into the string hash and returns
the pointer to allocated string. If the string is already in the
hash no actual allocation is made -- `str_dup' will simply
increment `refcount' for that string.
const char*
str_qdup(const char* s);
`str_qdup' expects that `s' points to string from
the string hash (i.e. already put there by `str_dup' or
another `str_qdup' call). `str_qdup' simply increments `refcount'
for `s' and returns `s'.
void
free_string(const char *s);
`free_string' decrements `refcount' for `s' and removes
it from the string hash if `refcount' has become zero.
const char*
str_printf(const char *format, ...);
`str_printf' produces printf-like output, which is returned.
char*
strnzcpy(char *dst, size_t len, const char *src);
char*
strnzncpy(char *dst, size_t len, const char *src, size_t count);
`strnzcpy' copies `src' to `dst', which length is `len' bytes.
`strnzncpy' is same as `strnzcpy', but copies no more than `count'
bytes.
char*
strnzcat(char *dst, size_t len, const char *src);
char*
strnzncat(char *dst, size_t len, const char *src, size_t count);
`strnzcat' appends `src' to the end of `dst'.
`strnzncat' appends no more than `count' symbols of `src' to the
end of `dst'.
char*
strlwr(const char *s);
`strlwr' lower-cases each symbol in `s' and returns the result.
int
str_cmp(const char *astr, const char *bstr);
int
str_ncmp(const char *astr, const char *bstr, size_t count);
Both these functions compare two strings, but `str_ncmp' considers
only first `count' symbols. Return 0 on string match.
bool
str_prefix(const char *astr, const char *bstr);
bool
str_infix(const char *astr, const char *bstr);
bool
str_suffix(const char *astr, const char *bstr);
All these functions search for partial matching of strings and
return TRUE if it does not match (historical compatibility).
`str_prefix' looks for `astr' being prefix of `bstr', `str_infix'
looks for `astr' being a part of `bstr' and `str_suffix' looks
for `astr' being suffix of `bstr'.
int
hashstr(const char *s, int maxn, int hashs);
int
hashistr(const char *s, int maxn, int hashs);
Both these functions calculate hash index for string `s', considering
no more than `maxn' first characters. Hash size `hashs' for `hashistr'
should be no greater than 256.
int
cmpstr(const void *a, const void *b);
`cmpstr' is a function to compare strings and is designed to use in
`varr_qsort' and `varr_bsearch' functions.
mlstring
========
`mlstring' stands for multi-lingual string. It's structure is simple:
an array with one member for each language defined or just char*,
depending on `nlang' field value.
mlstrings should never be allocated dynamically.
varr
====
varr is variable size array. varr should never be allocated
dynamically.
typedef struct varr varr;
struct varr {
size_t nsize; /* size of element */
size_t nstep; /* allocation step */
void *p; /* first element */
size_t nused; /* elements used */
size_t nalloc; /* elements allocated */
varr_e_init_t e_init; /* element initialization function*/
varr_e_destroy_t e_destroy; /* element deinititialization function*/
};
void
varr_init(varr *v, size_t nsize, size_t nstep);
`varr_init' initializes `nsize' and `nstep' fields of `v'.
All the functions expect that `nsize' and `nstep' are set to
correct values.
void
varr_destroy(varr *v);
`varr_destroy' frees all the memory allocated for `v'.
void*
varr_get(varr *v, int i);
`varr_get' is a macro which returns the pointer to
i'th element of `v' or NULL such element does not exist
(`i' is out of bounds).
void*
VARR_GET(varr *v, int i)
`VARR_GET' is a macro which returns the pointer to
i'th element of `v' without any bounds checking. `VARR_GET'
never returns NULL and should be used only if it is known that
`i' is not out of bounds. E.g. it is safe within iteration
for (i = 0; i < v.nused; i++) {
foo_t* fp = (foo_t*) VARR_GET(&v, i);
/* do something */
}
void*
varr_touch(varr *v, size_t i);
`varr_touch' returns the pointer to i'th element of `v'.
if the number of elems currently allocated for `v' is less than
`i' then `v' will be extended accordingly.
PART IX. TEXT OUTPUT.
---------------------
Basic output routines
=====================
Please note that proper translation can be made only if you
are using act-like functions (functions that accept act-style format)
for printing messages. printf-like functions should not be used at
all for generating output text. `act' already has all the needed
formatting capabilities (and if it does not -- you should implement
them in `act'). In Rom 2.4 single-line messages without any
formatting (like "Sun light disturbs you.\n") were printed
via `send_to_char'. In SoG `act' should be used everywhere.
void
send_to_char(const char *txt, CHAR_DATA *ch);
`send_to_char' prints `txt' to `ch'. The only translation
made within `send_to_char' is color codes ({x) expansion.
Normally `send_to_char' should not be used at all. It is intended
only for compatibility purposes and internal use.
void
char_puts(const char *txt, CHAR_DATA *ch);
`char_puts' prints `txt' to `ch' via `send_to_char'.
`txt' is translated via msgdb. Normally `char_puts' should not
be used at all except for printing "Huh?\n" and "Ok.\n" messages.
void
char_printf(CHAR_DATA *ch, const char *format, ...);
`char_printf' is printf-like function. `format' is
translated via msgdb. The result is printed to `ch' via
`send_to_char'.
`char_printf' was implemented in the early versions of SoG and
exists only because a lot of code (OLC) uses `char_printf'.
The use of `char_printf' should be limited to those modules
where it was decided to not to do translation (OLC, wiz-functions).
void
page_to_char(const char *txt, CHAR_DATA *ch);
`page_to_char' prints `txt' to `ch' via `send_to_char'
with pager. No `txt' translation/conversion is made within
`page_to_char'. Usually `page_to_char' is used with buffers
(buffer_t). E.g.:
buffer_t *buf = buf_new(-1);
buf_add(buf, ...);
...
...
page_to_char(buf_string(buf), ch);
buf_free(buf);
Text buffers
============
Using buffers is a way to write text which will be sent to character
in a large string and then send it (split to pages if needed).
Special type (BUFFER) is designed for this purpose.
typedef struct buf_data BUFFER;
struct buf_data {
BUFFER * next; /* next in list */
int lang; /* buffer language */
int state; /* error state of the buffer */
int size; /* buffer size in bytes */
char * string; /* buffer's string */
};
BUFFER *
buf_new(int lang);
`buf_new' creates new buffer of given language `lang'. Language can be
set to -1 for not language-specific buffer. If a language is specified,
buffered messages will be translated.
void
buf_free(BUFFER *buffer);
`buf_free' frees the memory allocated for specified buffer.
bool
buf_add(BUFFER *buffer, const char *string);
`buf_add' appendds specified string at the end of buffer. Returns
TRUE on success or FALSE on buffer overflow.
bool
buf_printf(BUFFER *buffer, const char *format, ...);
`buf_printf' performs standard printf-style format translation and
appends resulting string at the end of buffer. Return value is the
same as from `buf_add'.
bool
buf_act(BUFFER *buffer, const char *format, CHAR_DATA *ch,
const void *arg1, const void *arg2, const void *arg3,
int act_flags);
`buf_act' performs act() routine and appends its output to buffer.
See TEXT OUTPUT, act() for information on format specifiers.
void
buf_clear(BUFFER *buffer);
`buf_clear' resets buffer contents.
char *
buf_string(BUFFER *buffer);
`buf_string' returns the string that has been formed in buffer.
Advanced output (act-like functions)
====================================
void
act_puts3(const char *format, CHAR_DATA *ch,
const void *arg1, const void *arg2, const void *arg3,
int act_flags, int min_pos);
`act_puts3' is most versatile of these functions. It takes 3 arguments
and has the widest choice of format specifiers. They are:
ch arg1 arg2 arg3 meaning
----------------------------------------------------
$n $i $N $I character's name
-- -- $d -- door name
-- $j -- $J number
-- $p $P -- object name
-- $r -- $R room name
-- $t,$u $T $U plain text message
/*
*-----------------------------------------------------------------------------
* Never use these:
*
* $e -- $E -- pronoun for character (he, she, it)
* $m -- $M -- pronoun for character (him, her, it) (*)
* $s -- $S -- pronoun for character (his, her, its)
* $o -- $O -- ÎÅÇÏ/ÎÅÅ/...
* Use $gn{he} instead of $e (and $gN{he} instead of $e).
* (in russian messages: $gn{ÏÎ} and $gN{ÏÎ})
* Use $gn{him} instead of $m (and $gN{him} instead of $M).
* (in russian messages: $gn{ÅÇÏ} and $gN{ÅÇÏ})
* Use $gn{his} instead of $s (and $gN{his} instead of $S).
* (in russian messages: $gn{ÅÇÏ} and $gN{ÅÇÏ})
* And finally, in russian messages use $gn{ÎÅÇÏ} instead of $o.
*-----------------------------------------------------------------------------
*/
Substitutions for these specifiers can be changed using given modifiers:
$c - $cn{...} - case number ``n''
$F - $F[LCR]nn{...} - misc formatting
$FLnn formats string with "%-nn.nns" format
$FRnn formats string with "%nn.nns" format
$FCnn formats string to nn characters with central align
$g - $gx{...} - gender form depending on sex/gender of $x,
where x is one of [dnNiIpPtTuU]
E.g.:
$gn{...} - gender form depends on ch's sex
$go{...} - gender form depends on sex of character message
is sent to
$l - $lu{...} - uppercase first letter
$q - $qx{...} - numeric form depending on $x quantity,
x is one of [jJ]. E.g.:
$qj{...} - choose form for number $j
To prevent translation of `$' and `{' characters, they should be
escaped like `$$' and `${' respectively.
`act_flags' is bitwise OR of some of the following flags:
one from target flags (it defines who should receive this message)
TO_ROOM - all characters in the same room as `$n', except
`$n' itself
TO_NOTVICT - all characters in the same room as `$n', except
`$n' and `$N'
TO_VICT - `$N' only
TO_CHAR - `$n' only
TO_ALL - all characters in the same room as `$n'
and any from
ACT_TOBUF - append to replay buffer if receiver is link-dead
ACT_NOTRIG - do not pull act triggers
ACT_NOTWIT - do not perform twit list checking
ACT_NOTRANS - do not perform $t, $T, $u and $U transl.
ACT_NODEAF - skip chars deafened chars
ACT_STRANS - do $t and $T slang translation (from ch)
ACT_NOMORTAL - skip mortals
ACT_VERBOSE - skip if (!IS_SET(ch->comm, COMM_VERBOSE))
ACT_NOLF - do not append LF
ACT_NOUCASE - do not uppercase first letter
ACT_FORMSH - call format_short for short descrs
ACT_NOFIXSH - do not fix char/obj short descrs
ACT_NOFIXTEXT - do not call fix_short() for text args
ACT_USEOPT - use opt->to_lang and opt->to_sex even if to r-ed f-ly
A macro has been defined, to match flags of ch's speech:
ACT_SPEECH(ch) (ACT_NODEAF | ACT_STRANS | ACT_NOFIXTEXT | \
(!IS_NPC(ch) || IS_AFFECTED(ch, AFF_CHARM) ? \
ACT_NOTRANS : 0))
void
act_puts(const char *format, CHAR_DATA *ch,
const void *arg1, const void *arg2,
int act_flags, int min_pos)
`act_puts' is two-argument macro for `act_puts3'. Call it when you
don't need arg3.
void
act(const char *format, CHAR_DATA *ch,
const void *arg1, const void *arg2, int act_flags)
`act' is most commonly used macro for `act_puts3'. It has two arguments
and targets only active (standing/fighting/resting) characters.
void
act_buf(const char *format, CHAR_DATA *ch, CHAR_DATA *to,
const void *arg1, const void *arg2, const void *arg3,
actopt_t *opt, char *buf, size_t buf_len);
`act_buf' is a low-level output function, it dumps output to
`buf' string, having formatted it as it will be received by `to'
character. `to' shall not be NULL if a slang translation is supposed,
otherwise data (lang, sex) will be taken from `opt'.
typedef struct actopt_t {
int to_lang; /* target's interface language */
int to_sex; /* target's sex */
int act_flags; /* act flags to pass to act_puts3() */
} actopt_t;
`actopt_t' is an internal type and needs not to be used outside
comm_act.c. It is used to pass additional information from act_puts()
to act_buf(). Nevertheless, should you need some other info to be
passed, appropriate fields should be added to this structure.
Other act-like routines:
const char*
act_speech(CHAR_DATA *ch, CHAR_DATA *vch, const char *text, const void *arg);
Common routine to perform format specifiers substitution in misc
text output routines. Here: `ch' is the teller, `vch' is the listener,
`text' is act-like format string and `arg' is a substituter for $x
in `text'. `arg' will be substituted to `arg1' in act_puts(), so
use proper specifiers ($i, $j, $p, $r and $t).
void
act_yell(CHAR_DATA *ch, const char *text, const void *arg, const char *format);
void
act_clan(CHAR_DATA *ch, const char *text, const void *arg);
void
act_say(CHAR_DATA *ch, const char *text, const void *arg);
All these functions perform output to target characters: `act-yell'
to all characters in the same area as `ch', `act_clan' to all members
of the same clan as `ch' and `act_say' to all characters in the same
room. `text' and `arg' are passed directly to `act_speech' and hence
have the same meaning. `act_yell' takes `format' argument, which
specifies the phrase that precedes the yell. If format is NULL, it
is substituted with standard one.
Formatting routines:
const char*
fix_short (const char *short_descr);
const char*
format_short(mlstring *mshort, const char *name, CHAR_DATA *to, int act_flags);
const char*
format_long (mlstring *desc, CHAR_DATA *to);
const char*
PERS(ch, looker)
const char*
PERS2(CHAR_DATA *ch, CHAR_DATA *looker, int act_flags);
PART X. MODULES
---------------
All the dynamically loaded modules should have two functions:
int _module_load(module_t *m);
int _module_unload(module_t *m);
This functions should are called after `dlopen' and
before 'dlclose' respectively. This functions should return -1
on error (if so, module will not be considered loaded
and module will not be unloaded accordingly).
To ensure that modules and core module use the same ABI
(i.e: structures, types and functions definitions are the same) the
following scheme was implemented: file src/Makefile.rules
contains definition
ABI_VERSION=n
where `n' is considered as ABI_VERSION number. When ABI is changed
ABI_VERSION should be bumped (e.g.: increased by 1) and appropriate
modules should be rebuilt (don't forget to use `make depend'
to maintain proper dependencies for make).
There are 5 modules in SoG: core, dofun, events, olc, spellfun.
core
====
This module contains MUD vital command code (REBOOT, SHUTDOWN, MODULES).
This is the only module that cannot be reloaded.
Function type:
void do_foo(CHAR_DATA *ch, const char *argument);
Source file:
* core.c - module service and core command code
Module functions are called via:
dofun(const char *name, CHAR_DATA *ch, const char *format, ...)
dofun
=====
This module contains code for normal commands.
Function type:
void do_foo(CHAR_DATA *ch, const char *argument);
Source files:
* act_comm.c - communication commands
* act_info.c - information commands
* act_move.c - character movement commands
* act_obj.c - object handling commands
* act_wiz.c - immortal commands
* cast.c - `cast' dofun
* dofun.c - module service
* healer.c - healer actions
* hunt.c - hunting commands
* martial_art.c - martial art commands
* note.c - note reading/writing commands
* quest.c - questor actions
Module functions are called via:
dofun(const char *name, CHAR_DATA *ch, const char *format, ...)
events
======
This module contains event functions for affect handling.
Function type:
void event_foo(CHAR_DATA *ch, AFFECT_DATA *af);
Source files:
* events.c - module service
* eventfun.c - miscellaneous event functions
Module functions are called via:
check_event_fun(CHAR_DATA *ch, AFFECT_DATA *paf, flag32_t event)
check_one_event(CHAR_DATA *ch, AFFECT_DATA *paf, flag32_t event)
olc
===
This module contains routines for online creation.
Function type for commands:
void do_foo(CHAR_DATA *ch, const char *argument);
Function type for OLC subcommand functions:
bool fooed_bar(CHAR_DATA *ch, const char *argument, olc_cmd_t *cmd);
Function type for validators:
bool validate_foo(CHAR_DATA *ch, const void *arg)
Function type for OLC editors:
bool olced_foo(CHAR_DATA *ch, const char *argument,
olc_cmd_t *cmd, foo_t *data);
Source files:
* olc.c - module services and common routines
* olc.h - common declaractions
* olc_*.h - OLC for miscellaneous structures
Module functions are called via:
dofun(const char *name, CHAR_DATA *ch, const char *format, ...)
spellfun
========
This module contains spell functions.
Function type:
void spell_foo(const char *sn, int level, CHAR_DATA *ch, void *vo)
Source files:
* spellfun.c - module services
* magic.c - spell functions
* magic2.c - spell functions
Module functions are called via:
spellfun_call(const char *name, int level, CHAR_DATA *ch, void *vo)
spellfun_call2(const char *name, const char *sn, int level,
CHAR_DATA *ch, void *vo)
PART XI. On-Line Creation
--------------------------
On-line creation (OLC) is a module that introduces internal editor
for most SoG structures. Main part is contained in `olc.c' and
`olc.h' files, while the rest of files contain miscellanenous editors.
Main part consists of module service routines (_module_load() and
_module_unload() functions, see "Part X, Modules" for details),
OLC command interpreter and common editor functions and validators
(see below). You have no need to intervene OLC command interpretation
and module initializing routines in order to introduce your own editor.
All changes you need to make are described in the end of this part.
Every OLC editor should contain the following items:
Table for an OLC commands
=========================
{ subcommand name, subcommand function, validator, argument }
`validator' is a pointer to function that checks whether entered data
are appropriate or not. See below for details.
`argument' contains additional information needed by OLC subcommand
(e.g. pointer to flag table for flag setting commands).
Every OLC table should contain first six entries, in given order:
fooed_create, fooed_edit, fooed_save, fooed_touch, fooed_show,
fooed_list. Place your own functions after these entries. Don't forget
to place entry for `show_commands' function, this will enable character
to see list of available commands. Usually, it is placed at the end of
the table.
OLC subcommand functions
========================
For every subcommand declared in table there should be a function.
It does not need to change some fields in structure, but these
subcommands will be available only if character is in the appropriate
OLC editor. These functions should return TRUE if structure was changed
and needs to be saved and FALSE otherwise. These functions are named
like `(edit_type)ed_(edit_field)', e.g.: raceed_name for a function
that changes name of a race.
OLC editors
===========
Although there are many editors provided in olc.c you may need to write
your own. It should return TRUE if the value was changed and FALSE
otherwise. Its name should be like `olced_(type)', e.g.: olced_exit
for an exit_data editor.
You can receive additional data via (void *)cmd->arg1 pointer. It may
point to a validator (then you should call validator function before
changing a value), flag table (for flag setting routines) or any other
pointer. Just remember of its meaning when add lines to OLC table.
All these functions have the same syntax:
bool olced_foo(CHAR_DATA *ch, const char *argument,
olc_cmd_t *cmd, foo_t *foo);
`ch' is the character who is using this editor (to send messages to)
`argument' is a text string to pass to editor
`cmd' is a pointer to OLC table structure (to access validators and
command name
`foo' is a pointer to edited data
So, hereafter only `foo_t *' is specified in parenthesis.
`cmd->arg1'
Function name meaning Notes
============= ========== =======================
olced_spell_out(void*) -- Does nothing
olced_number(int*) validator changes integer
olced_name(const char**) validator toggles name(s)
olced_str(const char**) validator changes string
olced_str_text(const char**) -- invokes string editor
olced_mlstr(mlstring*) -- changes part of mlstring
olced_mlstrnl(mlstring*) -- the same, appendds `\n'
olced_mlstr_text(mlstring*) -- invokes string editor
olced_exd(ED_DATA**) -- edits extra description
olced_flag64(flag64_t*) flag table toggles flag(s)
olced_flag32(flag32_t*) flag table toggles flag(s)
olced_dice(int*) -- sets dice
olced_clan(int*) -- sets clan number
olced_rulecl(lang_t*) -- sets language options
olced_vform_add(rule_t*) -- adds word form
olced_vform_del(rule_t*) -- deletes word form
olced_exit(int door) -- defined in olc_room.c
OLC Validators
==============
When you need the value changed by standard OLC editor to be verified
for falling in range or for some another criteria, you can write a
validator function and specify it in OLC table. Validator should return
TRUE on value approval or FALSE on denial.
All validators should return TRUE if `argument' has appropriate value.
Function name Return true if Defined in
============= ============== ===========
validate_filename filename is legal olc.c
validate_room_vnum room exists olc.c
validate_skill_spec spec exists olc.c
validate_security `ch' has right to edit area olc_area.c
validate_minvnum minimal area vnum is ok olc_area.c
validate_maxvnum maximal area vnum is ok olc_area.c
validate_move area move is legal(performs it) olc_area.c
validate_name clan name is ok olc_clan.c
validate_name class name is ok olc_class.c
validate_whoname class short name is ok olc_class.c
validate_langname language name is ok olc_lang.c
validate_fvnum female clone of mobile exists olc_mob.c
validate_condition obj condition is 0..100 olc_obj.c
validate_name race name is ok olc_race.c
validate_whoname race short name is ok olc_race.c
validate_haspcdata race has pcdata defined olc_race.c
validate_name social has unique name olc_social.c
How to add OLC editor
=====================
To add your OLC editor you should add the following `to olc.c' and
`olc.h'.
To `olc.c':
const char *ED_FOO="foo"
string to indicate editor type (to type-cast PC(ch)->pEdit)
add a line in olced_table:
{ ED_FOO , "FooEd" , olc_cmds_foo }
string defining editor name ("FooEd") and its subcommand table
(olc_cmds_foo)
To `olc.h':
`extern' declarations for `ED_FOO' and `olc_cmds_foo'.
touch_foo(foo_t *foo)
function to set `changed' bit for given structure - this is
not always needed.
#define SECURITY_FOO
you may specify a security level to edit `foo_t' structure and
use this definition.
AFTERWORD
---------
This manual comes to you by:
fjoe (Max Khon, fjoe@iclub.nsu.ru)
Arborn (Alexey Neyman, avn@org.chem.msu.su)
Feel free to change this manual in order to match your changes as
you distribute it.