The Metamorph 3 API Package

The Metamorph 3 API package consists of the following files:

api3.doc   - this documentation
lapi3.lib  - MS-DOS, for Microsoft 'C' large model
             library containing all api functions
libapi3.a  - Unix library containing all api functions
api3.h     - header to be included by any program using Metamorph 3 api
api3i.h    - header automatically included by api3.h
mmsg.h     - header automatically included by api3.h
api3.c     - source code to the top level api calls
apimmsg.c  - source code to the default message handler
mmex1.c    - example source implementing a text search interface
mmex2.c    - example source implementing a database search interface
mmex2.dat  - example database for mmex2.c
readme.doc - system specific and installation notes

The Metamorph 3 API uses bytes and strings of bytes for most of its character manipulations. "Byte" is defined, in the API header, as an unsigned 8 bit quantity (unsigned char) and is used to allow greater latitude in string contents.

All byte pointers are normal 'C' strings (pointer to an array of bytes, terminated by '\0').

All byte pointer lists are arrays of pointers to normal 'C' strings. Each list is terminated with an empty string ((byte *)"").

WARNING: All APICP strings, string list members, and pointer arrays will be freed by closeapicp if they are !=NULL. This includes the terminator ("") in string lists.

The Metamorph API provides the following functions:

closeapicp() - control parameters interface
closemmapi() - cleanup
closemmsg()  - close the message file
fixmmsgfh()  - message control
getmmapi()   - search routine
infommapi()  - hit information
openapicp()  - control parameters interface
openmmapi()  - initialization
putmsg()     - message handler
rdmmapi()    - synchronized read
setmmapi()   - reinitialization

The minimum set of function calls you will use is:

closeapicp()
closemmapi()
getmmapi()
openapicp()
openmmapi()

The Metamorph 3 API needs 3K of stack space in addition to whatever the calling program uses.


Copyright © Thunderstone Software     Last updated: Dec 10 2018
Copyright © 2019 Thunderstone Software LLC. All rights reserved.