#include <stdinc.h>#include <extstring.h>void *getxstr(str, nbyt)stream str;int nbyt; bool putxstr(str, xstr, nbyt)stream str;void *xstr;int nbyt; void *copxstr(xstr, nbyt)void *xstr;int nbyt; int xstrlen(xstr, nbyt)void *xstr;int nbyt; bool xstreq(xstr1, xstr2, nbyt)void *xstr1, *xstr2;int nbyt;
getxstr and putxstr perform I/O of extended strings via the usual stdio(3) primatives. getxstr reads nbyt-long values from the input stream str until it encounters nbyt NULL bytes. It stores the values in space dynamically allocated using malloc(3) and returns a pointer to the extended string, or NULL on end of file or error. putxstr writes an extended string xstr of nbyt-long values, including the terminating NULLs, to an output stream str. It returns TRUE unless an I/O error occured.
copxstr copies its extended string argument xstr to space allocated using malloc.
xstrlen counts the number of nbyt-long values in xstr, including the terminating NULL-value.
xstreq compares extended strings, and returns TRUE if they are equal.
24-jul-95 document written JEB 18-feb-04 char->void PJT