home *** CD-ROM | disk | FTP | other *** search
- From: greim@sbsvax.cs.uni-sb.de (Michael Greim)
- Newsgroups: alt.sources
- Subject: KEF - a library to store and identify function key presses, Part 05/06
- Message-ID: <4367@sbsvax.cs.uni-sb.de>
- Date: 15 May 90 15:17:29 GMT
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 4 (of 5)."
- # Contents: kdb-low/kdb-low.man kef/kef.man
- # Wrapped by greim@usb370 on Tue May 15 09:38:17 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'kdb-low/kdb-low.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'kdb-low/kdb-low.man'\"
- else
- echo shar: Extracting \"'kdb-low/kdb-low.man'\" \(10202 characters\)
- sed "s/^X//" >'kdb-low/kdb-low.man' <<'END_OF_FILE'
- X.TH kdb-low 3 local
- X.DA 6 December 89
- X.SH NAME
- Xkdb-low : kef__init_db, kef__add, kef__remove, kef__cleanup, kef__read,
- Xkef_write, kef_error, kef_match, kef_walk, kef_get_value, kef_advance,
- Xkef__next_inst, kef__build_str
- X.SH SYNOPSIS
- X.nf
- X# include <kef.h>
- X
- Xkef__init_db (kdb, nd, num_nodes, my_malloc, my_realloc, my_free)
- X
- Xkef__add (kdb, str, val)
- X
- Xkef__remove (kdb, str)
- X
- Xkef__cleanup (kdb)
- X
- Xkef__read (fd, kdb, nd, num_nodes, my_malloc, my_realloc, my_free)
- X
- Xkef_write (fd, kdb)
- X
- Xstr = kef_error (num)
- X
- Xkef_match (kdb, str, val)
- X
- Xkef_walk (kdb, c, pinx)
- X
- Xkef_get_value (kdb, pos, pval)
- X
- Xkef_advance (kdb, c, pinx)
- X
- Xkef__next_inst (kdb, val, pinx)
- X
- Xkef__build_str (kdb, inx, buf, size_buf)
- X
- Xint kef_errno;
- X
- XWith:
- X
- Xstruct kef_db * kdb;
- Xstruct kef_node * nd;
- Xint num_nodes, size_buf;
- Xchar * (* my_malloc) ();
- Xchar * (* my_realloc) ();
- Xvoid (* my_free) ();
- Xchar * str, * buf;
- Xkef_value val;
- Xkef_value * pval;
- Xint num;
- Xchar c;
- Xkef_index pos, * pinx;
- X
- X.ef
- X
- X.SH DESCRIPTION
- XThe routines described here belong to kdb-low, a part of the KEF library
- Xused to recognize function key presses. The KEF library
- Xis divided into 4 parts: kdb-low, kdb-high, kef and kef-id.
- Xkdb-low contains all low level routines to work on the datastructures
- Xused to store the strings. The datastructures are called "KEF database",
- Xor short "kef_db" or "kdb". The routines are low level because they don't
- Xcall malloc/realloc/free and treat the database as static storage. For some
- Xof these routines there are equivalents in kdb-high, namely for those routines
- Xwhose names start with "kef__".
- X.br
- XThe database stores pairs (string, value) so that "value" can be retrieved,
- Xwhen "string" is encountered in an input.
- X.br
- XAll routines of the KEF library, except where noted otherwise, return
- Xan integer number indicating success or failure. An error has occured,
- Xwhen the number is less or equal -10, everything was ok when the number is 0.
- X
- X.SH ROUTINE DESCRIPTION
- X.sp 2
- XAny parameter with name "kdb" is declared as "struct kef_db * kdb".
- X.PP
- X\fBkef__init_db\fR (kdb, nd, num_nodes, my_malloc, my_realloc, my_free)
- X.in +4
- Xstruct kef_node * nd;
- X.br
- Xint num_nodes;
- X.br
- Xchar * (* my_malloc) ();
- X.br
- Xchar * (* my_realloc) ();
- X.br
- Xvoid (* my_free) ();
- X.in -4
- X
- XInitializes a kef_db database structure for further use setting it
- Xto state "empty". The structure
- Xof a header (kef_db) and an array of slots (kef_node), in which entries
- Xinto the database are stored, must have been allocated already.
- Xnum_nodes is the number of elements in array nd.
- XThe kef_db structure contains
- X3 slots for pointers at functions, which may be called only by high
- Xlevel routines. They are set to my_malloc, my_realloc and my_free
- Xrespectively. Whenever a KEF routine tries to allocate storage it will
- Xuse the routines specified here. If you don't want to use any dynamic
- Xstorage you can specify a null pointer ("(char * (*)())0") here.
- X.sp 2
- X\fBkef__add\fR (kdb, str, val)
- X.in +4
- Xchar * str;
- X.br
- Xkef_value val;
- X.in -4
- Xadds pair (str, val) to database associated with structure pointed at by kdb.
- XIt is possible to add a string which
- Xis a prefix to another string already in the database.
- X.sp 2
- X\fBkef__remove\fR (kdb, str)
- X.in +4
- Xchar * str;
- X.in -4
- X.br
- XRemove entry for string str from database kdb.
- X.sp 2
- X\fBkef__cleanup\fR (kdb)
- X.br
- XReorder the information in database to allow faster access.
- X
- X.sp 2
- X\fBkef__read\fR (fd, kdb, nd, num_nd, my_malloc, my_realloc, my_free)
- X.in +4
- Xint fd;
- X.br
- Xstruct kef_node * nd;
- X.br
- Xint num_nodes;
- X.br
- Xint num_nd;
- X.br
- Xchar * (my_alloc *) ();
- X.br
- Xchar * (my_realloc *) ();
- X.br
- Xvoid (my_free *) ();
- X.in -4
- XSetup the KEF database, fill it with data from file. The file referenced
- Xby file descriptor fd must be open for reading and the file pointer
- Xmust point at the start of data suitable for reading by kef.
- XThe data that KEF expects in the file has the following format:
- X.br
- X- header; fixed size; contains number of nodes to follow
- X.br
- X- nodes
- X.br
- XNote that the read routines automatically detect when the data was
- Xwritten on a machine with a different byte order and swap the byte to
- Xget the data correct.
- X.br
- XIt is an error when the array nd is not large enough to receive all
- Xdata from file.
- X
- X.sp 2
- X\fBkef_write\fR (fd, kdb)
- X.in +4
- Xint fd;
- X.in -4
- XWrite essential information from KEF database pointed at by kdb to file
- Xfd, suitable for reading by kef_read (or other read routines).
- X
- X.sp 2
- Xs = \fBkef_error\fR (kef_errno)
- X.in +4
- Xchar * s;
- X.br
- Xint kef_errno;
- X.in -4
- XWhen a KEF routine returns an error code you can use kef_error to
- Xobtain a descriptive string for error code kef_errno.
- X
- X.sp 2
- X\fBkef_match\fR (kdb, str, val)
- X.in +4
- Xchar * str;
- X.br
- Xkef_value * val;
- X.in -4
- XWith kef_match you can look whether a string is in the database.
- X"str" is the string for which kef_match searches, it returns
- X0 : not found or 1 : found. If the string was found, val is set to
- Xthe associated value from the database.
- XNote that this routine does not return any error, if kdb is not pointing
- Xat a correctly created KEF database, the results are unpredictable.
- X
- X.sp 2
- X\fBkef_advance\fR (kdb, c, pinx)
- X.in +4
- Xchar c;
- X.br
- Xkef_index * pinx;
- X.in -4
- XWalk around in a database representation. Calling this routine you step
- Xdown level by level in the tree that the database is using to store its
- Xentries. pinx holds the current place in the tree. If "*pinx == KEE_NIL"
- Xthen the routine starts from the root node.
- XIf the character was found the routine returns 1 and writes the relevant index
- Xat the place pointed at by pinx. If the character was not found, it
- Xreturns 0 but the contents of the location pointed at by pinx
- Xare not changed.
- X.br
- Xkef_advance does not maintain the structures necessary for kef__build_str to
- Xfunction.
- X.sp 2
- XExample:
- X.br
- XYou want to search for string "abc". Not only do you want to know whether this
- Xstring is in the database, you also want to know whether there is any
- Xprefix of it in the database.
- X.br
- X.nf
- X char * s, * base;
- X int count;
- X kef_index p;
- X kef_value val;
- X
- X base = s = "abc";
- X
- X p = KEF_NIL;
- X for (count = 0; *(++s) != '\0' && kef_advance (kdb, *s, &p) == 1;) {
- X if (kef_get_value (kdb, p, &val) == 1) {
- X printf ("prefix string found, length %1d, val = %1d\\n",
- X (int)(s - base), val);
- X count ++;
- X }
- X }
- X /*
- X * Note that p is either KEF_NIL, or the index of the last cell
- X * examined.
- X */
- X if (*s == '\0' && p != KEF_NIL && kef_get_value (kdb, p, &val) == 1)
- X printf ("string is in database, value = %1d\\n", val);
- X else
- X printf ("string is not in database\\n");
- X printf ("there are %1d prefix strings in database\\n", count);
- X.fi
- X
- X.sp 2
- X\fBkef_walk\fR (kdb, pinx)
- X.in +4
- Xkef_index * pinx;
- X.in -4
- XWalk depth first through the tree of character cells.
- XTo start a walk, write KEF_NIL at the location pointed at by pinx.
- XThe walk is finished, when there is a KEF_NIL at the location
- Xpointed at by pinx after a call to kef_walk.
- XThe routine returns standard KEF error values.
- X.br
- Xkef_walk manipulates the contents of the array to find its way back
- Xwithout needing an external data structure. This internal data structure
- Xcan be used to build the string leading to the current place in the tree.
- Xkef_walk uses a field of the node structure that is unused except by the
- X"cleanup" routines.
- XAfter a call to kef_walk you can call kef__build_str (see below) to get
- Xthe string that leads to the place in the tree that you are at now.
- X.sp 2
- XExample :
- X.br
- XVisit all nodes in the tree:
- X.br
- X.nf
- X kee_index inx;
- X int ret;
- X
- X inx = KEF_NIL;
- X while ((ret = kef_walk (kdb, &inx)) == KEF_E_OK && inx != KEF_NIL)
- X printf ("at node %1d\n", inx);
- X if (ret != KEF_E_OK)
- X printf ("kef error %s\n", kee_error(ret));
- X else
- X printf ("walk done.\n");
- X.fi
- X
- X.sp 2
- X\fBkef_get_value\fR (kdb, pos, pval)
- X.in +4
- Xkef_index pos;
- X.br
- Xkef_value * pval;
- X.in -4
- XExamine the entry with internal address pos whether there is a value
- Xassociated with the string by which we arrived at this entry. "pos" was
- Xreturned by kef_advance or kef_walk.
- XReturns 0 : if no value 1 : if value. If there is a value, the cell pointed
- Xat by pval will receive the value.
- X.br
- XNote that you must not add or delete entries from the database, nor call
- Xkef_cleanup while walking the tree with
- Xkef_start_walk, kef_walk and kef_get_value.
- X
- X.sp 2
- X\fBkef__next_inst\fR (kdb, val, pinx)
- X.in +4
- Xkef_value val;
- X.br
- Xkef_index * pinx;
- X.in -4
- XRun depth-first through tree of character cells searching for cells
- Xwith value val. When found return index of found cell at location
- Xpointed at by pinx. Start with search at cell "*pinx", or at start
- Xof tree if "*pinx" is equal KEF_NIL.
- X.br
- XThis routine is used while searching for all occurances of a value
- Xin a tree.
- Xkef__next_inst uses kef_walk to traverse the tree (see above).
- X.br
- XThe routine returns 0 : no value found i.e. at end of tree; 1 : found, the
- Xindex of the cell at which value was found will be written to "*pinx"; else
- Xnormal KEF error values.
- X
- X.sp 2
- X\fBkef__build_str\fR (kdb, inx, buf, size_buf)
- X.in +4
- Xkef_index inx;
- X.br
- Xchar * buf;
- X.br
- Xint size_buf;
- X.in -4
- XUse the information built and returned by kef__next_inst to build a
- Xstring. buf receives the string, size_buf is the maximal number of
- Xbytes to use in buf.
- XReturns 0 : everything ok, -1 : buffer too small.
- X.br
- XTypically, kef__next_inst and kef__build_str are used together like in
- X.nf
- X /*
- X * Search for "val"
- X */
- X kef_index here;
- X int ret;
- X
- X here = KEF_NIL;
- X while (kef__next_inst (kdb, val, &here) == 1) {
- X ret = kef__build_str (kdb, here, buf, size_buf);
- X if (ret == -1)
- X printf ("buffer too small\\n");
- X else if (ret == 0)
- X printf ("string found : %s\\n", buf);
- X else
- X printf ("kef error : %s\\n", kef_error (ret));
- X }
- X.fi
- X
- X.SH BUGS
- X-
- X'in +4
- XThe KEF routines do not try to save a user from his/her own foolishness
- Xbeyond a sensible limit. I.e. most routines do not check whether the
- Xparameter kdb is pointing at a valid data structure.
- X.in -4
- X
- X.SH SEE ALSO
- Xkdb-high(3), kef(3), kef-id(3)
- X.br
- X"Kee - a library of routines to handle input from ASCII terminals" by M. Greim
- X
- X.SH AUTHOR
- XMichael Greim (greim@cs.uni-sb.de)
- END_OF_FILE
- if test 10202 -ne `wc -c <'kdb-low/kdb-low.man'`; then
- echo shar: \"'kdb-low/kdb-low.man'\" unpacked with wrong size!
- fi
- # end of 'kdb-low/kdb-low.man'
- fi
- if test -f 'kef/kef.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'kef/kef.man'\"
- else
- echo shar: Extracting \"'kef/kef.man'\" \(11349 characters\)
- sed "s/^X//" >'kef/kef.man' <<'END_OF_FILE'
- X.TH kef 3 local
- X.DA 7 march 90
- X.SH NAME
- Xkef : kef_create, kef_mcreate, kef__init, kef_get, kef_set_timeout,
- Xkef_get_timeout, kef_set_delay, kef_get_delay
- X.SH SYNOPSIS
- X.nf
- X# include <kef.h>
- X
- Xkef_create (pk, buf, buf_size, kdb, fd)
- X
- Xkef_mcreate (pk, buf, buf_size, kdb, fd, my_malloc, my_realloc, my_free)
- X
- Xkef__init (k, buf, buf_size, kdb, fd, my_malloc, my_realloc, my_free)
- X
- Xkef_get (k)
- X
- Xkef_set_timeout (k, msec, ind)
- X
- Xkef_set_delay (k, msec, ind)
- X
- Xkef_get_timeout (k, pmsec)
- X
- Xkef_get_delay (k, pmsec)
- X
- Xint kef_errno;
- X
- XWith:
- X
- Xstruct kef * k, ** pk;
- Xstruct kef_db * kdb;
- Xchar * buf;
- Xint size_buf, ind, msec, * pmsec;
- Xchar * (* my_malloc) ();
- Xchar * (* my_realloc) ();
- XFREE_TYPE (* my_free) ();
- X
- X.ef
- X
- X.SH DESCRIPTION
- XThe routines described here belong to kef, a part of the KEF library
- Xused to recognize function key presses. The KEF library
- Xis divided into 4 parts: kdb-low, kdb-high, kef and kef-id.
- Xkef contains the routines to read characters from a terminal, search
- Xthrough the KEF database and return either a character or a value
- Xassociated with a string in the KEF database.
- XPart of kef does not use malloc/realloc/free and can be used in an
- Xenvironment where these routines are not available, have different names
- Xor are known to be buggy.
- X.br
- XAll routines of the KEF library, except where noted otherwise, return
- Xan integer number indicating success or failure. An error has occured,
- Xwhen the number is less or equal -10, everything was ok when the number is 0.
- X
- X.SH ROUTINE DESCRIPTION
- X.sp 2
- XAny parameter with name "k" is declared as "struct kef * k".
- X.PP
- X
- X\fBkef_create\fR (pk, buf, buf_size, kdb, fd)
- X.in +4
- Xchar * buf;
- X.br
- Xint buf_size;
- X.br
- Xstruct kef_db * kdb;
- X.br
- Xint fd;
- X.in -4
- XCall kef_mcreate as
- Xkef_mcreate (pk, buf, buf_size, kdb, fd, malloc, realloc, free)
- X
- X.sp 2
- X\fBkef__init\fR (k, buf, buf_size, kdb, fd, my_malloc, my_realloc, my_free)
- X.in +4
- Xchar * buf;
- X.br
- Xint buf_size;
- X.br
- Xstruct kef_db * kdb;
- X.br
- Xint fd;
- X.br
- Xchar * (my_malloc *) ();
- X.br
- Xchar * (my_realloc *) ();
- X.br
- XFREE_TYPE (my_free *) ();
- X.in -4
- XInitialize the structure pointed at by k using the variables passed.
- XIt is an error INV_PAR for k or buf to be NULL or for buf_size to be less or
- Xequal 0.
- X
- X.sp 2
- X\fBkef_mcreate\fR (pk, buf, buf_size, kdb, fd, my_malloc, my_realloc, my_free)
- X.in +4
- Xstruct kef ** pk;
- X.br
- Xchar * buf;
- X.br
- Xint buf_size;
- X.br
- Xstruct kef_db * kdb;
- X.br
- Xint fd;
- X.br
- Xchar * (my_malloc *) ();
- X.br
- Xchar * (my_realloc *) ();
- X.br
- XFREE_TYPE (my_free *) ();
- X.in -4
- XAllocate space for a kef structure and initialize it by calling kef__init.
- XReturn the pointer to the allocate area in the place pointed to by pk.
- Xbuf is the address of an area used for temporary storage of characters,
- Xjust after they have been read in and before they are passed to
- Xany calling routine. If buf is NULL an area of length buf_size is
- Xallocated, if buf_size is 0 a default size of 512 is used.
- XIt is an error INV_PAR, if buf is not equal NULL and buf_size is equal
- Xor less than 0.
- X
- X.sp 2
- X\fBkef_get\fR (k)
- X.br
- XRead a character or a string generated by pressing a key on the keyboard.
- XThis key can either send a single character or a sequence of several
- Xcharacters. Keys that send several characters are traditionally called
- X"function keys". KEF can recognise that a function key was pressed, if
- Xthe sequence of characters transmitted is in the KEF database and
- Xit has a value associated with it. When KEF sees such a string it
- Xreturns the associated value from the database.
- Xkef buffers characters as long as the sequence read so far is
- Xa prefix of a sequence stored in the KEF database and no delay or
- Xtimeout was exceeded.
- X.br
- XA delay is the time that can elapse while kef_get is waiting for the
- Xfirst character, the character that may start a sequence.
- XA timeout is the time that may elapse while kef_get is waiting for any
- Xsubsequent characters.
- XA delay can be set with kef_set_delay, a timeout can be set with
- Xkef_set_timeout.
- XFor possible values for timeout and delay see kef_set_timeout and
- Xkef_set_delay.
- X.sp 2
- XExample:
- X.br
- XSuppose your KEF database contains, among other, the sequence "\\E[C",
- Xwhere "\\E" is the escape character 0x1b.
- XYou press a function key, that generates the sequence "\\E[C",
- Xso the
- Xkeyboard sends 3 characters to the program. kef_get is waiting for
- Xa character (controlled by delay), it receives "\\E", it checks the KEF
- Xdatabase and
- Xsees that there are sequences starting with "\\E". It tries to read another
- Xcharacter (controlled by timeout) and gets (fairly fast) the "[". It checks
- Xagain the KEF
- Xdatabase and sees that there is a sequence starting with "\\E[". It
- Xtries to read another character (again controlled by timeout) and gets
- Xthe "C". Now kef_get sees that there is only one sequence starting with
- X"\\E[C" so it returns the value associated with this sequence.
- X.sp 2
- Xkef_get returns a signed integer value. If this value is >= 0 then
- Xit is the value associated with a character or a character sequence.
- XIf it is less than 0 then it is either
- X.br
- XKEF_NO_CHAR :
- X'in +4
- Xthere is no character available, i.e. delay was exceeded.
- X.in -4
- XKEF_INTERRUPT :
- X'in +4
- Xsome system call got interrupted by a signal. Nothing was
- Xread, try again, if necessary.
- X.in -4
- XKEF_EOF :
- X'in +4
- XEOF was reached. This can happen when the input was a file or a pipe.
- X.in -4
- XKEF_SOME_ERROR :
- X'in +4
- Xsome system call has returned an error indication. The value of the
- Xvariable errno was stored in kef_errno.
- X.in -4
- X
- X.sp 2
- X\fBkef_set_timeout\fR (k, msec, ind)
- X.in +4
- Xint msec, ind;
- X.in -4
- XA timeout is a pair of (ind,msec) values. ind is a boolean flag, msec
- Xis a time in milliseconds. If ind == 0 then there is no timeout,
- Xmsec is ignored. If ind != 0 and msec == 0 then kef_get will wait
- Xforever ("block") for a character, if ind != 0 and msec != 0 then
- Xkef_get will use msec as the number of milliseconds to wait for a
- Xcharacter.
- X
- X.sp 2
- X\fBkef_set_delay\fR (k, msec, ind)
- X.in +4
- Xint msec, ind;
- X.in -4
- XA delay is (like timeout) a pair of (ind,msec) values. ind is a boolean flag,
- Xmsec
- Xis a time in milliseconds. If ind == 0 then there is no delay,
- Xmsec is ignored. If ind != 0 and msec == 0 then kef_get will wait
- Xforever ("block") for a character, if ind != 0 and msec != 0 then
- Xkef_get will use msec as the number of milliseconds to wait for a
- Xcharacter.
- X
- X.sp 2
- X\fBkef_get_timeout\fR (k, pmsec)
- X.in +4
- Xint * pmsec;
- X.in -4
- XReturns 0 if there is no timeout, 1 if there is one. If there is a timeout,
- Xthen kef_get_timeout writes the milliseconds value at the place pointed
- Xat by pmsec.
- X
- X.sp 2
- X\fBkef_get_delay\fR (k, pmsec)
- X.in +4
- Xint * pmsec;
- X.in -4
- XReturns 0 if there is no delay, 1 if there is one. If there is a delay,
- Xthen kef_get_delay writes the milliseconds value at the place pointed
- Xat by pmsec.
- X
- X.sp 2
- XYou can forbid kef_get and its friends to use the KEF database.
- XSet the k->use_db to 0 and any subsequent calls to kef_get will
- Xnot use the database. Set k->use_db to 1 and kef_get will use the
- Xdatabase again.
- X.br
- XNote that there may be several kef structures in a program and that they
- Xcan be used independently. Each kef structure holds the associated
- Xfile descriptor.
- X.br
- XDon't use routines from stdio (standard IO) library on the same
- Xfiles as a KEF structure. Both KEF and stdio buffer output, KEF holds
- Xthe characters that are read but not processed yet and the characters
- Xthat were peeked in advance to determine whether a certain character
- Xor sequence of characters was the start of a sequence in the KEF database.
- X
- X.SH ERRORS
- XKEF routines return values below -10 to indicate errors. The routine
- Xkef_error (see kdb-low(3)) returns a string for any such value or,
- Xif it has no string for a given integer value, returns
- Xa string "** kef error N **" with the numeric value substituted for
- X"N".
- X.br
- XHere is a listing of errors as they appear in kef.h. All names of
- Xerror constants
- Xstart with "KEF_E_", this prefix is dropped.
- X.sp 2
- XOK
- X.in +4
- XRoutine returned no error, everything is ok.
- X.in -4
- XSOME_ERROR
- X.in +4
- XA system call or a library routine returned with an error indication.
- XThe value of variable errno (see errno(2)) has been stored in kef_errno.
- X.in -4
- XNODES_USEDUP
- X.in +4
- XThere are no more nodes available in the KEF database to store characters
- Xin. This error is returned by kef__add (see kdb-low(3)).
- X.in -4
- XSTRING_TWICE
- X.in +4
- XThere was a try to add string to the database that was already in it.
- X.in -4
- XWRITE_ERROR
- X.in +4
- XThere was an error while writing the internal representation of
- Xthe KEF database to a file.
- X.in -4
- XREAD_ERROR
- X.in +4
- XThere was an error while reading the internal representation of
- Xthe KEF database from a file. Note that this error will also occur when
- Xyou try to read a file that does not contain a valid dump of a KEF
- Xdatabase or that is not positioned at the start of the database data.
- X.in -4
- XNOT_FOUND
- X.in +4
- XThe routine kef_remove was called to remove a string from the database,
- Xbut that string could not be found.
- X.in -4
- XEMPTY_STRING
- X.in +4
- XA string was given to a routine that was either the NULL pointer or
- Xstarted with a NUL character.
- X.in -4
- XWRONG_MAGIC
- X.in +4
- XWhen starting to read from a file that allegedly contains a dump of
- Xthe KEF database the first 4 bytes are examined and compared to a
- X4 byte magic number. If they don't match an error WRONG_MAGIC is
- Xgenerated.
- X.in -4
- XTOO_MANY_NODES
- X.in +4
- XThe routine kef__read was called to read a dump of a KEF database.
- XThere are too many nodes on file to fit in the area at kef__read's
- Xdisposal.
- X.in -4
- XSIZE_KDB
- X.in +4
- XA part of a KEF database dump specifies the size of the "kef_db"
- Xstructure. If it is not the same as the size
- Xfor the internal structure an error SIZE_KDB is generated.
- X.in -4
- XSIZE_NODE
- X.in +4
- XA part of a KEF database dump specifies the size of the "kef_node"
- Xstructure. If it is not the same as the size
- Xfor the internal structure an error SIZE_NODE is generated.
- X.in -4
- XNO_MALLOC
- X.in +4
- XA routine was called that needs to do some allocation, but the internal
- Xfield for malloc is empty.
- X.in -4
- XNO_REALLOC
- X.in +4
- XA routine was called that needs to do some allocation, but the internal
- Xfield for realloc is empty.
- X.in -4
- XNO_FREE
- X.in +4
- XA routine was called that needs to do some allocation and releasing,
- Xbut the internal
- Xfield for free is empty.
- X.in -4
- XALLOC_FAILED
- X.in +4
- XAllocation of memory failed.
- X.in -4
- XCHECK
- X.in +4
- XThere is a routine that is part of the library, that checks the KEF
- Xdatabase for validity. This routine returns an error CHECK when it
- Xfinds an inconsistency. The user is not supposed to call this routine
- Xdirectly, therefore it is not documented here.
- X.in -4
- XINV_PAR
- X.in +4
- Xkef_mcreate was called with parameter buf != NULL but size_buf <= 0
- X.in -4
- XINV_INX
- X.in +4
- XThe parameter "inx" to kef__build_str is not in the acceptable range
- Xfor indices in the internal KEF database.
- X.in -4
- XTAG_LOOP
- X.in +4
- XThe routine kef_build_str tried to build a string, but there seems to
- Xbe a loop in its data structures. This may happen if you call kef_build_str
- Xor its associates with wrong parameter values.
- X.in -4
- X
- X.SH BUGS
- X-
- X'in +4
- XThe KEF routines do not try to save a user from his/her own foolishness
- Xbeyond a sensible limit. I.e. most routines do not check whether the
- Xparameter k is pointing at a valid data structure.
- X.in -4
- X
- X.SH SEE ALSO
- Xkdb-low(3), kdb-high(3), kef-id(3)
- X.br
- X"Kee - a library of routines to handle input from ASCII terminals" by M. Greim
- X
- X.SH AUTHOR
- XMichael Greim (greim@cs.uni-sb.de)
- END_OF_FILE
- if test 11349 -ne `wc -c <'kef/kef.man'`; then
- echo shar: \"'kef/kef.man'\" unpacked with wrong size!
- fi
- # end of 'kef/kef.man'
- fi
- echo shar: End of archive 4 \(of 5\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- .-. .-. .-. Michael Greim
- ( X )( __) e-mail : greim@cs.uni-sb.de
- \ / \ / \ / or : ...!uunet!unido!sbsvax!greim
- ~ ~ ~
-