C API

API Functions

cgi_debug_init cgi_parse cgi_destroy cgi_register_strfuncs cgi_output
cgi_url_validate cgi_cs_init cgi_url_escape_more cgi_neo_error cgi_redirect
cgi_filehandle cgi_register_parse_cb cgi_url_escape cgi_init cgi_redirect_uri
cgi_cookie_clear cgi_url_unescape cgi_vredirect cgi_display cgi_error
cgi_cookie_set cgi_css_url_validate cgi_cookie_authority cgiwrap_iterenv cgiwrap_putenv
cgiwrap_init_emu cgiwrap_writef cgiwrap_init_std cgiwrap_writevf cgiwrap_read
cgiwrap_write cgiwrap_getenv cs_dump cs_destroy cs_render
cs_register_esc_strfunc cs_register_fileload cs_init cs_register_strfunc cs_parse_string
cs_parse_file cs_register_esc_function dictDestroy dictCleanup dictReleaseLock
dictRemove dictNext dictCreate dictSetValue dictModifyValue
dictSearch filter_wait filter_create_fp filter_create_fd neos_auto_parse_var
neos_auto_reset neos_auto_init neos_auto_parse neos_auto_destroy neos_auto_escape
neos_auto_set_content_type nerr_error_traceback nerr_pass nerr_error_string nerr_pass_ctx
nerr_init nerr_warn_error nerr_match nerr_log_error nerr_ignore
nerr_register nerr_raise nerr_handle hdf_set_symlink hdf_get_valuef
hdf_dump_str hdf_get_int_value hdf_read_string_ignore hdf_copy hdf_get_node
hdf_set_value hdf_obj_child hdf_read_string hdf_set_buf hdf_register_fileload
hdf_get_obj hdf_get_attr hdf_obj_top hdf_dump_format hdf_destroy
hdf_init hdf_obj_value hdf_write_string hdf_sort_obj hdf_write_file_atomic
hdf_obj_attr hdf_set_valuef hdf_get_copy hdf_write_file hdf_get_valuevf
hdf_set_int_value hdf_dump hdf_get_value hdf_set_copy hdf_obj_next
hdf_search_path hdf_obj_name hdf_set_attr hdf_get_child hdf_remove_tree
ne_log ne_set_log ne_set_log_options ne_warn ne_vwarn
skipDelete skipFreeList skipRelease skipInsert skipSearch
skipNext skipNewList mCreate fCreate mUnlock
fUnlock cBroadcast cSignal fFind cDestroy
cCreate mDestroy cWait fLock fDestroy
mLock wdb_keys

cgi_debug_init - - initialize standalone debugging
void cgi_debug_init (int argc, char **argv);

cgi_debug_init initializes a CGI program for standalone
debugging. By running a ClearSilver CGI program with a
filename on the command line as the first argument, the
CGI program will load that file of the form K=V as a set
of HTTP/CGI environment variables. This allows you to
run the program under a debugger in a reproducible
environment. None
Arguments: argc/argv - the arguments from main
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_parse - - Parse incoming CGI data
NEOERR *cgi_parse (CGI *cgi);

We split cgi_init into two sections, one that parses
just the basics, and the second is cgi_parse. cgi_parse
is responsible for parsing the entity body of the HTTP
request. This payload is typically only sent (expected)
on POST/PUT requests, but generally this is called on
all incoming requests. This function walks the list of
registered parse callbacks (see cgi_register_parse_cb),
and if none of those matches or handles the request, it Either data populated into files and cgi->hdf, or whatever
other side effects of your own registered callbacks.
Arguments: cgi - a pointer to a CGI pointer
Output: Either data populated into files and cgi->hdf, or whatever
other side effects of your own registered callbacks.
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_destroy - - deallocate the data associated with a CGI
void cgi_destroy (CGI **cgi);

cgi_destroy will destroy all the data associated with a
CGI, which mostly means the associated HDF and removal
of any files that were uploaded via multipart/form-data.
(Note that even in the event of a crash, these files
will be deleted, as they were unlinked on creation and
only exist because of the open file pointer) cgi - NULL on output
Arguments: cgi - a pointer to a pointer to a CGI struct
Output: cgi - NULL on output
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_register_strfuncs - - Register CGI CS strfuncs
NEOERR *cgi_register_strfuncs(CSPARSE *cs);

cgi_register_strfuncs is a helper function which
registers all of the CGI specific string functions on
the given CSPARSE. These include url_escape,
html_escape, text_html, js_escape, html_strip,
url_validate, css_url_validate and null_escape. None
Arguments: cs - a CSPARSE struct
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_output - - display the CGI output to the user
NEOERR *cgi_output (CGI *cgi, STRING *output);

Normally, this is called by cgi_display, but some
people wanted it external so they could call it
directly. None
Arguments: cgi - a pointer a CGI struct allocated with cgi_init
output - the data to send to output from the CGI
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_url_validate - - validate that url is of an allowed format
NEOERR *cgi_url_validate (const char *buf, char **esc);

cgi_url_validate will check that a URL starts with
one of the accepted safe schemes.
If not, it returns "#" as a safe substitute.
Currently accepted schemes are http, https, ftp and mailto.
It then html escapes the entire URL so that it is safe to
insert in an href attribute. esc - a newly allocated string
Arguments: buf - a 0 terminated string
Output: esc - a newly allocated string
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_cs_init - - initialize CS parser with the CGI defaults
NEOERR *cgi_cs_init(CGI *cgi, CSPARSE **cs);

cgi_cs_init initializes a CS parser with the CGI HDF
context, and registers the standard CGI filters cs - the allocated/initialized CS struct
Arguments: cgi - a pointer a CGI struct allocated with cgi_init
cs - a pointer to a CS struct pointer
Output: cs - the allocated/initialized CS struct
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_url_escape_more - - url escape a string
NEOERR *cgi_url_escape_more (const char *buf, char **esc, const char *other);

cgi_url_escape_more will do URL escaping on the passed in
string, and return a newly allocated string that is escaped.
Characters which are escaped include control characters,
%, ?, +, space, =, &, /, and " and any characters in
other esc - a newly allocated string
Arguments: buf - a 0 terminated string
other - a 0 terminated string of characters to escape
Output: esc - a newly allocated string
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_neo_error - - display a NEOERR call backtrace
void cgi_neo_error (CGI *cgi, NEOERR *nerr);

cgi_neo_error will output a 500 error containing the
NEOERR call backtrace. This function is likely to be
removed from future versions in favor of some sort of
user error mechanism. None
Arguments: cgi - a pointer to a CGI struct
nerr - a NEOERR (see util/neo_err.h for details)
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_redirect - - send an HTTP 302 redirect response
void cgi_redirect (CGI *cgi, const char *fmt, ...)
ATTRIBUTE_PRINTF(2,3);

cgi_redirect will redirect the user to another page on
your site. This version takes only the path portion of
the URL. As with all printf style commands, you should
not call this with arbitrary input that may contain %
characters, if you are forwarding something directly,
use a format like cgi_redirect (cgi, "%s", buf) None
Arguments: cgi - cgi struct
fmt - printf style format with args
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_filehandle - - return a file pointer to an uploaded file
FILE *cgi_filehandle (CGI *cgi, const char *form_name);

cgi_filehandle will return the stdio FILE pointer
associated with a file that was uploaded using
multipart/form-data. The FILE pointer is positioned at
the start of the file when first available. None
Arguments: cgi - a pointer to a CGI struct allocated with cgi_init
form_name - the form name that the file was uploaded as
(not the filename) (if NULL, we're asking for the
file handle for the PUT upload)
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_register_parse_cb - - Register a parse callback
NEOERR *cgi_register_parse_cb(CGI *cgi, const char *method, const char *ctype,
void *rock, CGI_PARSE_CB parse_cb);

The ClearSilver CGI Kit has built-in functionality to handle
the following methods:
GET -> doesn't have any data except query string, which
is processed for all methods
POST w/ application/x-www-form-urlencoded
POST w/ multipart/form-data
processed as RFC2388 data into files and HDF (see
cgi_filehandle())
PUT (any type)
The entire data chunk is stored as a file, with meta
data in HDF (similar to single files in RFC2388).
The data is accessible via cgi_filehandle with NULL
for name.
To handle other methods/content types, you have to
register your own parse function. This isn't necessary
if you aren't expecting any data, and technically HTTP
only allows data on PUT/POST requests (and presumably
user defined methods). In particular, if you want to
implement XML-RPC or SOAP, you'll have to register a
callback here to grab the XML data chunk. Usually
you'll want to register POST w/ application/xml or POST
w/ text/xml (you either need to register both or
register POST w/ * and check the ctype yourself,
remember to nerr_raise(CGIParseNotHandled) if you aren't
handling the POST).
In general, your callback should:
Find out how much data is available:
l = hdf_get_value (cgi->hdf, "CGI.ContentLength", NULL);
len = atoi(l);
And read/handle all of the data using cgiwrap_read.
See the builtin handlers for how this is done. Note
that cgiwrap_read is not guarunteed to return all of
the data you request (just like fread(3)) since it
might be reading of a socket. Sorry.
You should be careful when reading the data to watch
for short reads (ie, end of file) and cases where the
client sends you data ad infinitum. None
Arguments: cgi - a CGI struct
method - the HTTP method you want to handle, or * for all
ctype - the HTTP Content-Type you want to handle, or * for all
rock - opaque data that we'll pass to your call back
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_url_escape - - url escape a string
NEOERR *cgi_url_escape (const char *buf, char **esc);

cgi_url_escape will do URL escaping on the passed in
string, and return a newly allocated string that is escaped.
Characters which are escaped include control characters,
%, ?, +, space, =, &, /, and " esc - a newly allocated string
Arguments: buf - a 0 terminated string
Output: esc - a newly allocated string
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_init - - Initialize ClearSilver CGI environment
NEOERR *cgi_init (CGI **cgi, HDF *hdf);

cgi_init initializes the ClearSilver CGI environment,
including creating the HDF data set. It will then import
the standard CGI environment variables into that dataset,
will parse the QUERY_STRING into the data set, and parse
the HTTP_COOKIE into the data set. Note that if the
var xdisplay is in the form data, cgi_init will attempt
to validate the value and launch the configured debugger
on the CGI program. These variables have to be
specified in the hdf_file pointed to by hdf_file. The
default settings do not allow debugger launching for
security reasons. cgi - an allocated CGI struct, including
Arguments: cgi - a pointer to a CGI pointer
hdf_file - the path to an HDF data set file that will also be
loaded into the dataset. This will likely have to
a be a full path, as the HDF search paths are not
yet set up. Certain things, like
Output: cgi - an allocated CGI struct, including
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_redirect_uri - - send an HTTP 302 redirect response
void cgi_redirect_uri (CGI *cgi, const char *fmt, ...)
ATTRIBUTE_PRINTF(2,3);

cgi_redirect_uri will redirect the user to another page on
your site. This version takes the full URL, including
protocol/domain/port/path.
As with all printf style commands, you should
not call this with arbitrary input that may contain %
characters, if you are forwarding something directly,
use a format like cgi_redirect (cgi, "%s", buf) None
Arguments: cgi - cgi struct
fmt - printf style format with args
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_cookie_clear - - clear browser cookie
NEOERR *cgi_cookie_clear (CGI *cgi, const char *name, const char *domain,
const char *path);

cgi_cookie_clear will send back a Set-Cookie string that
will attempt to stop a browser from continuing to send
back a cookie. Note that the cookie has to match in
name, domain, and path, and the luck of the Irish has to
be with you for this work all the time, but at the least
it will make the browser send back a cookie with no
value, which the ClearSilver cookie parsing code will
ignore. None
Arguments: cgi - a CGI struct
name - the cookie name to clear
domain - the domain to clear, NULL for none
path - the cookie's path
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_url_unescape - - unescape an url encoded string
char *cgi_url_unescape (char *buf);

cgi_url_unescape will do URL unescaping on the passed in
string. This function modifies the string in place
This function will decode any %XX character, and will
decode + as space
Arguments: buf - a 0 terminated string
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_vredirect - - send an HTTP 302 redirect response
void cgi_vredirect (CGI *cgi, int uri, const char *fmt, va_list ap);

cgi_vredirect is mostly used internally, but can be used
if you need a varargs version of the function. None
Arguments: cgi - cgi struct
uri - whether the URL is full (1) or path only (0)
fmt - printf format string
ap - stdarg va_list
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_display - - render and display the CGI output to the user
NEOERR *cgi_display (CGI *cgi, const char *cs_file);

cgi_display will render the CS template pointed to by
cs_file using the CGI's HDF data set, and send the
output to the user. Note that the output is actually
rendered into memory first. None
Arguments: cgi - a pointer a CGI struct allocated with cgi_init
cs_file - a ClearSilver template file
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_error - - display an error string to the user
void cgi_error (CGI *cgi, const char *fmt, ...)
ATTRIBUTE_PRINTF(2,3);

cgi_error will output a 500 error containing the
specified error message. This function is likely to be
removed from future versions in favor of a user error
mechanism. None
Arguments: cgi - a pointer to a CGI struct
fmt - printf style format string and arguments
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_cookie_set - - Set a browser Cookie
NEOERR *cgi_cookie_set (CGI *cgi, const char *name, const char *value,
const char *path, const char *domain,
const char *time_str, int persistent, int secure);

cgi_cookie_set will issue a Set-Cookie header that
should cause a browser to return a cookie when required.
Note this function does no escaping of anything, you
have to take care of that first. None
Arguments: cgi - a CGI struct
name - the name of the cookie
value - the value to set the cookie to.
path - optional path for which the cookie is valid. Default
is /
domain - optional domain for which the cookie is valid. You
can use cgi_cookie_authority to determine this
domain. Default is none, which is interpreted by
the browser as the sending domain only.
time_str - expiration time string in the following format
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_css_url_validate - - validate that url is safe to use in CSS.
NEOERR *cgi_css_url_validate (const char *buf, char **esc);

cgi_css_url_validate will check that a URL is safe against XSS
by verifying that it is relative, or that it starts with
one of the accepted safe schemes. If not, it returns "#" as
a safe substitute. Currently accepted schemes are http, https,
ftp and mailto. It then escapes the entire URL so that the URL
is safe inside @import statements or in a CSS property such as esc - a newly allocated string
Arguments: buf - a 0 terminated string
Output: esc - a newly allocated string
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgi_cookie_authority - - determine the cookie authority for a domain
char *cgi_cookie_authority (CGI *cgi, const char *host);

cgi_cookie_authority will walk the CookieAuthority
portion of the CGI HDF data set, and return the matching
domain if it exists. The purpose of this is so that you
set domain specific cookies. For instance, you might
have
CookieAuthority.0 = neotonic.com
In which case, any webserver using a hostname ending in
neotonic.com will generate a cookie authority of
neotonic.com. None
Arguments: cgi - a CGI struct
host - optional host to match against. If NULL, the function
will use the HTTP.Host HDF variable.
Output: None
Related Functions
cgi_debug_init, cgi_parse, cgi_destroy, cgi_js_escape, cgi_html_escape_strfunc, cgi_register_strfuncs, cgi_output, parse_rfc2388, cgi_url_validate, open_upload, cgi_cs_init, cgi_url_escape_more, cgi_html_strip_strfunc, cgi_neo_error, cgi_redirect, cgi_filehandle, cgi_register_parse_cb, cgi_url_escape, cgi_init, cgi_redirect_uri, cgi_text_html_strfunc, cgi_cookie_clear, cgi_url_unescape, cgi_vredirect, cgi_display, cgi_html_ws_strip, cgi_error, cgi_cookie_set, cgi_css_url_validate, cgi_cookie_authority,


cgiwrap_iterenv - - iterater for env vars
NEOERR *cgiwrap_iterenv (int n, char **k, char **v);

cgiwrap_iterenv allows a program to iterate over all the
environment variables. This is probably mostly used by
the default debug output. k - a malloc'd copy of the variable name
v - a malloc'd copy of the variable value
Arguments: n - variable to return. This should start at 0 and increment
until you receive a NULL return value.
Output: k - a malloc'd copy of the variable name
v - a malloc'd copy of the variable value
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_putenv - - wrap the putenv call
NEOERR *cgiwrap_putenv (const char *k, const char *v);

cgiwrap_putenv wraps the putenv call. This is mostly
used by the cgi_debug_init function to create an
artificial environment. This version differs from the
system version by having separate arguments for the
variable name and value, which makes life easier for the
caller (usually), and keeps most wrapping callbacks from
having to implement a parser to separate them. None
Arguments: k - the env var name
v - the new value for env var k
Output: None
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_init_emu - - initialize cgiwrap for emulated use
void cgiwrap_init_emu (void *data, READ_FUNC read_cb,
WRITEF_FUNC writef_cb, WRITE_FUNC write_cb, GETENV_FUNC getenv_cb,
PUTENV_FUNC putenv_cb, ITERENV_FUNC iterenv_cb);

cgiwrap_init_emu sets up the cgiwrap subsystem for use
in an emulated environment where you are providing
routines to use in place of the standard routines, ie
when used to interface with a server or scripting
language.
See cgi/cgiwrap.h for the exact definitions of the
callback functions. None
Arguments: data - user data to be passed to the specified callbacks
read_cb - a cb to replace fread(stdin)
writef_cb - a cb to repalce fprintf(stdout)
write_cb - a cb to replace fwrite(stdout)
getenv_cb - a cb to replace getenv
putenv_cb - a cb to replace putenv
iterenv_cb - a cb to replace the default environment iteration
function (which just wraps walking the envp array)
Output: None
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_writef - - a wrapper for printf
NEOERR *cgiwrap_writef (const char *fmt, ...)
ATTRIBUTE_PRINTF(1,2);

cgiwrap_writef is the formatted output command that
replaces printf or fprintf(stdout) in a standard CGI None
Arguments: fmt - standard printf fmt string and args
Output: None
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_init_std - - Initialize cgiwrap with default functions
void cgiwrap_init_std (int argc, char **argv, char **envp);

cgiwrap_init_std will initialize the cgiwrap subsystem
to use the default CGI functions, ie
getenv/putenv/stdio. In reality, all this is doing is
setting up the data for the cgiwrap_iterenv() function. None
Arguments: the arguments to main, namely argc/argv/envp
Output: None
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_writevf - - a wrapper for vprintf
NEOERR *cgiwrap_writevf (const char *fmt, va_list ap);

cgiwrap_writevf is the formatted output command that
replaces vprintf or fvprintf(stdout) in a standard CGI
It is also used by cgiwrap_writef (the actual wrapped
function is a v type function) None
Arguments: fmt - standard printf fmt string
ap - stdarg argument pointer
Output: None
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_read - - cgiwrap input function
void cgiwrap_read (char *buf, int buf_len, int *read_len);

cgiwrap_read is used to read incoming data from the
client, usually from a POST or PUT HTTP request. It
wraps the part of fread(stdin). read_len - the number of bytes read into buf
Arguments: buf - a pre-allocated buffer to read the data into
buf_len - the size of the pre-allocated buffer
Output: read_len - the number of bytes read into buf
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_write - - wrapper for the fwrite(stdout)
NEOERR *cgiwrap_write (const char *buf, int buf_len);

cgiwrap_write is the block data output function for
cgiwrap that replaces fwrite(stdout) in regular CGIs None
Arguments: buf - a character buffer
buf_len - the length of the buffer in buf
Output: None
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cgiwrap_getenv - - the wrapper for getenv
NEOERR *cgiwrap_getenv (const char *k, char **v);

cgiwrap_getenv wraps the getenv function for access to
environment variables, which are used to pass data to
CGI scripts. This version differs from the system
getenv in that it makes a copy of the value it returns,
which gets around problems when wrapping this routine in
garbage collected/reference counted languages by
moving the ownership of the data to the calling
function. v - a newly allocated copy of the value of that variable, or
NULL if not found.
Arguments: k - the environment variable to lookup
Output: v - a newly allocated copy of the value of that variable, or
NULL if not found.
Related Functions
cgiwrap_iterenv, cgiwrap_putenv, cgiwrap_init_emu, cgiwrap_writef, cgiwrap_init_std, cgiwrap_writevf, cgiwrap_read, cgiwrap_write, cgiwrap_getenv,


cs_dump - - dump the cs parse tree
NEOERR *cs_dump (CSPARSE *parse, void *ctx, CSOUTFUNC cb);

cs_dump will dump the CS parse tree in the parse struct.
This can be useful for debugging your templates.
This function also uses the CSOUTFUNC callback to
display the parse tree. None
Arguments: parse - the CSPARSE structure created with cs_init
ctx - user data to be passed to the CSOUTFUNC
cb - a CSOUTFUNC callback
Output: None
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_destroy - - clean up and dealloc a parse tree
void cs_destroy (CSPARSE **parse);

cs_destroy will clean up all the memory associated with
a CSPARSE structure, including strings passed to
cs_parse_string. This does not clean up any memory
allocated by your own CSOUTFUNC or the HDF data
structure passed to cs_init. It is safe to call this
with a NULL pointer, and it will leave parse NULL as
well (ie, it can be called more than once on the same
var) parse - will be NULL
Arguments: parse - a pointer to a parse structure.
Output: parse - will be NULL
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_render - - render a CS parse tree
NEOERR *cs_render (CSPARSE *parse, void *ctx, CSOUTFUNC cb);

cs_render will evaluate a CS parse tree, calling the
CSOUTFUNC passed to it for output. Note that calling
cs_render multiple times on the same parse tree may or
may not render the same output as the set statement has
side-effects, it updates the HDF data used by the
render. Typically, you will call one of the cs_parse
functions before calling this function. None
Arguments: parse - the CSPARSE structure containing the CS parse tree
that will be evaluated
ctx - user data that will be passed as the first variable to
the CSOUTFUNC.
cb - a CSOUTFUNC called to render the output. A CSOUTFUNC is
defined as:
typedef NEOERR* (*CSOUTFUNC)(void *, char *);
Output: None
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_register_esc_strfunc - - cs_register_strfunc with escaping context
NEOERR *cs_register_esc_strfunc(CSPARSE *parse, char *funcname,
CSSTRFUNC str_func);

cs_register_esc_strfunc functions exactly as cs_register_strfunc
except that it changes the evaluation escaping context to disable
default escaping.
Arguments: parse - a pointer to a CSPARSE structure initialized with cs_init()
funcname - the name for the CS function call
Note that registering a duplicate funcname will
raise a NERR_DUPLICATE error
str_func - a CSSTRFUNC not-callback
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_register_fileload - - register a fileload function
void cs_register_fileload(CSPARSE *parse, void *ctx, CSFILELOAD fileload);

cs_register_fileload registers a fileload function that
overrides the built-in function. The built-in function
uses hdf_search_path and ne_file_load (based on stat/open/read)
to find and load the file on every template render.
You can override this function if you wish to provide
other template search functions, or load the template
from an in-memory cache, etc.
This fileload function will be used by cs_parse, including None
Arguments: parse - a pointer to an initialized CSPARSE structure
ctx - pointer that is passed to the CSFILELOAD function when called
fileload - a CSFILELOAD function
Output: None
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_init - - create and initialize a CS context
NEOERR *cs_init (CSPARSE **parse, HDF *hdf);

cs_init will create a CSPARSE structure and initialize
it. This structure maintains the state and information
necessary for parsing and rendering a CS template. parse will contain a pointer to the allocated CSPARSE
structure. This structure will be deallocated with
cs_destroy()
Arguments: parse - a pointer to a pointer to a CSPARSE structure that
will be created
hdf - the HDF dataset to be used during parsing and rendering
Output: parse will contain a pointer to the allocated CSPARSE
structure. This structure will be deallocated with
cs_destroy()
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_register_strfunc - - register a string handling function
NEOERR *cs_register_strfunc(CSPARSE *parse, char *funcname, CSSTRFUNC str_func);

cs_register_strfunc will register a string function that
can be called during CS render. This not-callback is
designed to allow for string formating/escaping
functions that are not built-in to CS (since CS is not
HTML specific, for instance, but it is very useful to
have CS have functions for javascript/html/url
escaping). Note that we explicitly don't provide any
associated data or anything to attempt to keep you from
using this as a generic callback...
The format of a CSSTRFUNC is:
NEOERR * str_func(char *in, char **out);
This function should not modify the input string, and
should allocate the output string with a libc function.
(as we will call free on it)
Arguments: parse - a pointer to a CSPARSE structure initialized with cs_init()
funcname - the name for the CS function call
Note that registering a duplicate funcname will
raise a NERR_DUPLICATE error
str_func - a CSSTRFUNC not-callback
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_parse_string - - parse a CS template string
NEOERR *cs_parse_string (CSPARSE *parse, char *buf, size_t blen);

cs_parse_string parses a string. The string is
modified, and internal references are kept by the parse
tree. For this reason, ownership of the string is
transfered to the CS system, and the string will be
free'd when cs_destroy() is called.
The parse information will be appended to the current
parse tree. During parse, the only HDF variables which
are evaluated are those used in evar or include
statements. None
Arguments: parse - a CSPARSE structure created with cs_init
buf - the string to parse. Embedded NULLs are not currently
supported
blen - the length of the string
Output: None
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_parse_file - - parse a CS template file
NEOERR *cs_parse_file (CSPARSE *parse, const char *path);

cs_parse_file will parse the CS template located at
path. It will use hdf_search_path() if path does not
begin with a '/'. The parsed CS template will be
appended to the current parse tree stored in the CSPARSE
structure. The entire file is loaded into memory and
parsed in place. None
Arguments: parse - a CSPARSE structure created with cs_init
path - the path to the file to parse
Output: None
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


cs_register_esc_function -
NEOERR *cs_register_esc_function(CSPARSE *parse, const char *funcname,
int n_args, CSFUNCTION function);

Registers a function the same way as cs_register_function, but
disables auto escaping for the output of the function.
Arguments: parse - a pointer to a CSPARSE structure initialized with cs_init()
funcname - the name for the CS function call
Note that registering a duplicate funcname will
raise a NERR_DUPLICATE error
n_args - expected number of argument for funcname
function - callback of type CSFUNCTION, to handle the registered
function.
Related Functions
cs_dump, cs_destroy, cs_render, cs_register_esc_strfunc, cs_arg_parsev, cs_register_fileload, cs_init, cs_register_strfunc, cs_arg_parse, cs_parse_string, cs_parse_file, cs_register_esc_function, =, cs_register_function,


dictDestroy - - destroy dictionary.
void dictDestroy(dictCtx dict);

Release all resources used by <dict>. None.
Arguments: dict - dictionary to destroy
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictCleanup - - cleanup dictionary
void dictCleanup(dictCtx dict, dictCleanupFunc cleanup, void *rock);

Calls <cleanup> for every item in <dict>. If <cleanup>
returns true, then item is removed from <dict>. None.
Arguments: dict - dictionary to cleanup
cleanup - cleanup callback
rock - to pass to <cleanup>
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictReleaseLock - - release lock on value.
void dictReleaseLock(dictCtx dict, void *lock);

Releases the lock on the value associated with <lock>. Once
the lock is released, the dictCleanupFunc callback can
be called for the value (see dictCleanup()). None.
Arguments: dict - dictionary containing value to release.
lock - lock to release.
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictRemove - - remove item from dictionary.
BOOL dictRemove(dictCtx dict, const char *id);

Removes item identified by <id> from <dict>. None.
Arguments: dict - dictionary to search in.
id - identifier of item to remove.
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictNext - - search for next value in dictionary.
void *dictNext(dictCtx dict, char **id, void **plock);

Can be used to iterate through values in the dictionary.
The order is the order of the hash of the ids, which
isn't usefully externally. Will return the value if
found, or NULL if not. If <plock> is non-NULL, then
the lock returned in <plock> will be associated with
the returned value. Until this lock is passed to
dictReleaseLock(), the value will not be passed to the
dictCleanupFunc callback (see dictCleanup()). plock - set to value lock.
id - pointer to id of found value
Arguments: dict - dictionary to iterate over.
id - pointer to identifier of last item found, or
pointer to NULL to retrieve first.
plock - place for value lock (or NULL).
Output: plock - set to value lock.
id - pointer to id of found value
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictCreate - - create new dictionary.
NEOERR *dictCreate(dictCtx *dict, BOOL threaded, UINT32 root, UINT32 maxLevel,
UINT32 flushLimit, BOOL useCase,
dictFreeValueFunc freeValue, void *freeRock);

Returns a dictionary. If <threaded> is true, list is
multi-thread safe. <root>, <maxLevel>, and <flushLimit>
act as for skipNewList() (see skiplist.h) None.
Arguments: threaded - true if list should be thread-safe.
root - performance parameter (see above).
maxLevel - performance parameter (see above).
flushLimit - max deleted items to keep cached before
forcing a flush.
useCase - true to be case sensitive in identifiers
freeValue - callback when freeing a value
freeRock - context for freeValue callback
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictSetValue - - set/reset an items value.
NEOERR *dictSetValue(dictCtx dict, const char *id, void *value);

Updates the <id>/<value> pair into <dict>.
If <id> is not in <dict>, it is created. None.
Arguments: dict - dictionary to add pair to.
id - identifier to insert/update
value - value to store (may NOT be NULL)
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictModifyValue - - create/modify an item.
NEOERR *dictModifyValue(dictCtx dict, const char *id, dictNewValueCB new_cb,
dictUpdateValueCB update, void *rock);

Finds <id>'s value and calls <update>. If <id> is
not in <dict>, calls <new> to obtain a new value. None.
Arguments: dict - dictionary to add pair to.
id - identifier of value
new - function to call to create new value (may be NULL)
update - function to call to modify value (if NULL, the old
value is freed, and <new> is used)
rock - context to pass to <new> or <update>.
Output: None.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


dictSearch - - search for value in dictionary.
void *dictSearch(dictCtx dict, const char *id, void **plock);

Searches for <id> in <dict>, and returns value if
found, or NULL if not. If <plock> is non-NULL, then
the lock returned in <plock> will be associated with
the returned value. Until this lock is passed to
dictReleaseLock(), the value will not be passed to the
dictCleanupFunc callback (see dictCleanup()). plock - set to value lock.
Arguments: dict - dictionary to search in.
id - identifier of item to find.
plock - place for value lock (or NULL).
Output: plock - set to value lock.
Related Functions
dictDestroy, dictCleanup, dictReleaseLock, dictRemove, dictNext, dictCreate, dictSetValue, dictModifyValue, dictSearch,


filter_wait - - wrap waitpid to decode the exitcode and why your filter quit
NEOERR *filter_wait(pid_t pid, int options, int *exitcode);

filter_wait wraps the waitpid call and raises an error
(with description) if the call failed. Note that if the
ask for the exitcode and the process exited with a code
other than zero, we don't raise an error. If you don't
ask for the exitcode, and it is non-zero, we raise an
error exitcode -> the exitcode if the process existed normally
Arguments: pid -> the process identifier to wait for
options -> the options to pass to waitpid (see wait(2))
Output: exitcode -> the exitcode if the process existed normally
Related Functions
filter_wait, filter_create_fp, filter_create_fd,


filter_create_fp - - similar to filter_create_fd except with buffered FILE*
NEOERR *filter_create_fp(const char *cmd, FILE **in, FILE **out, FILE **ferr,
pid_t *pid);

filter_create_fp is identical to filter_create_fd,
except each of the pipes is wrapped in a buffered stdio FILE in -> the stdin FILE of the sub process
out -> the stdout FILE of the sub process
err -> the stderr FILE of the sub process
pid -> the pid of the sub process
Arguments: cmd -> the sub command to execute. Will be executed with
/bin/sh -c
in -> pointer to return the stdin pipe, or NULL if you don't
want the stdin pipe
out -> pointer to return the stdout pipe, or NULL if you don't
want the stdout pipe
ferr -> pointer to return the stderr pipe, or NULL if you don't
want the stderr pipe
Output: in -> the stdin FILE of the sub process
out -> the stdout FILE of the sub process
err -> the stderr FILE of the sub process
pid -> the pid of the sub process
Related Functions
filter_wait, filter_create_fp, filter_create_fd,


filter_create_fd - - Create a sub process and return the requested pipes
NEOERR *filter_create_fd(const char *cmd, int *fdin, int *fdout, int *fderr,
pid_t *pid);

filter_create_fd and filter_create_fp are what popen fdin -> the stdin file descriptor of the sub process
fdout -> the stdout file descriptor of the sub process
fderr -> the stderr file descriptor of the sub process
pid -> the pid of the sub process
Arguments: cmd -> the sub command to execute. Will be executed with
/bin/sh -c
fdin -> pointer to return the stdin pipe, or NULL if you don't
want the stdin pipe
fdout -> pointer to return the stdout pipe, or NULL if you don't
want the stdout pipe
fderr -> pointer to return the stderr pipe, or NULL if you don't
want the stderr pipe
Output: fdin -> the stdin file descriptor of the sub process
fdout -> the stdout file descriptor of the sub process
fderr -> the stderr file descriptor of the sub process
pid -> the pid of the sub process
Related Functions
filter_wait, filter_create_fp, filter_create_fd,


neos_auto_parse_var - - Parse input if parser is in interesting state.
NEOERR *neos_auto_parse_var(NEOS_AUTO_CTX *ctx, const char *str, int len);

neos_auto_parse_var takes an auto-escape context, which contains
a pointer to the underlying htmlparser. It passes the input
string to the htmlparser, if the input occurs inside a tag
definition. None
Arguments: ctx -> an object specifying the currrent auto-escape context.
str -> input string to parse.
len -> length of str.
*
Output: None
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


neos_auto_reset - - Re-initialize an existing NEOS_AUTO_CTX object.
NEOERR* neos_auto_reset(NEOS_AUTO_CTX *ctx);

Create the associated htmlparser object if it does not exist,
or reset the existing one. ctx -> will contain the re-initialized NEOS_AUTO_CTX object.
Arguments: ctx -> pointer to an existing NEOS_AUTO_CTX structure.
*
Output: ctx -> will contain the re-initialized NEOS_AUTO_CTX object.
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


neos_auto_init - - Create and initialize a NEOS_AUTO_CTX object.
NEOERR *neos_auto_init(NEOS_AUTO_CTX **pctx);

Returns an initialized NEOS_AUTO_CTX object, by internally
initializing an htmlparser object. pctx -> will contain the newly initialized NEOS_AUTO_CTX object.
Arguments: pctx -> pointer to pointer to NEOS_AUTO_CTX structure.
*
Output: pctx -> will contain the newly initialized NEOS_AUTO_CTX object.
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


neos_auto_parse - - Parse input and update auto-escape context.
NEOERR *neos_auto_parse(NEOS_AUTO_CTX *ctx, const char *str, int len);

neos_auto_parse takes an auto-escape context, which contains a
pointer to the underlying htmlparser. It passes the input string
to the htmlparser, which updates its internal state accordingly. None
*
Arguments: ctx -> an object specifying the currrent auto-escape context.
str -> input string to parse.
len -> length of str.
*
Output: None
*
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


neos_auto_destroy - - Free the NEOS_AUTO_CTX object.
void neos_auto_destroy(NEOS_AUTO_CTX **pctx);

Calls htmlparser_delete to free the associated htmlparser object. None.
*
Arguments: pctx -> pointer to pointer that should be freed.
*
Output: None.
*
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


neos_auto_escape - - Escape input according to auto-escape context.
NEOERR *neos_auto_escape(NEOS_AUTO_CTX *ctx, const char* str,
char **esc, int *do_free);

neos_auto_escape takes an auto-escape context, determines the
escaping modifications needed to make input safe in that context.
It applies these modifications to the input string. It will
first determine if any modifications are necessary, if not - the
input string is returned as output. esc -> the escaped string will be returned in this pointer.
do_free -> if *do_free is true, *esc should be freed. If not, *esc
contains str and should not be freed.
Arguments: ctx -> an object specifying the currrent auto-escape context.
str -> input string which will be escaped.
*
Output: esc -> the escaped string will be returned in this pointer.
do_free -> if *do_free is true, *esc should be freed. If not, *esc
contains str and should not be freed.
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


neos_auto_set_content_type - - Sets expected content type of input.
NEOERR *neos_auto_set_content_type(NEOS_AUTO_CTX *ctx, const char *type);

Takes a MIME type header, and configures the underlying
htmlparser object to expect input of the corresponding type.
This functionality is provided for situations where the html
parser cannot itself determine the proper starting context of
the input, for instance - when a javascript source file or a
stylesheet is being parsed.
This function should be called before any input is processed
using neos_auto_parse(). None.
*
Arguments: ctx -> an object specifying the currrent auto-escape context.
type -> the MIME type of input. Currently supported MIME types are:
"text/html", "text/xml", "text/plain", "application/xhtml+xml",
"application/javascript", "application/json", "text/javascript"
*
Output: None.
*
Related Functions
neos_auto_parse_var, neos_auto_reset, neos_auto_init, neos_auto_parse, neos_auto_destroy, neos_auto_escape, neos_auto_set_content_type,


nerr_error_traceback - - returns the full trackeback of the error chain
void nerr_error_traceback (NEOERR *nerr, STRING *str);

returns the full traceback of the error chain
Arguments: nerr - error
str - string to which the data is appended
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_pass - - pass a clearsilver error up a level in the call chain

this function is used to pass an error up a level in the
call chain (ie, if the error isn't handled at the
current level). This allows us to track the traceback
of the error.
Arguments: with the macro, the function name, file and lineno are
automagically recorded. Just pass the error.
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_error_string - - returns the string associated with an error
void nerr_error_string (NEOERR *nerr, STRING *str);

returns the string associated with an error (the bottom
level of the error chain)
Arguments: nerr - error
str - string to which the data is appended
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_pass_ctx - - pass a clearsilver error up a level in the call chain with additional information

this function is used to pass an error up a level in the
call chain (ie, if the error isn't handled at the
current level). This allows us to track the traceback
of the error.
This version includes context information about lower
errors
Arguments: with the macro, the function name, file and lineno are
automagically recorded. Just pass the error and
a printf format string giving more information about where
the error is occuring.
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_init - - initialize the NEOERR error subsystem
NEOERR *nerr_init (void);

initialize the NEOERR system. Can be called more than once.
This registers all of the built in error types as defined at
the top of this file. If you don't call this, all exceptions
will be returned as UnknownError.
Arguments: None
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_warn_error -
void nerr_warn_error (NEOERR *err);

prints out the error using ne_warn
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_match - - walk the NEOERR chain for a matching error ("catch")
int nerr_match (NEOERR *nerr, NERR_TYPE type);

nerr_match is used to walk the NEOERR chain and match
the error against a specific error type. In exception
parlance, this would be the equivalent of "catch".
Typically, you can just compare a NEOERR against STATUS_OK
or just test for true if you are checking for any error.
Arguments: err - the NEOERR that has an error.
type - the NEOERR type, as registered with nerr_register
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_log_error - - print the error chain to stderr
void nerr_log_error (NEOERR *nerr);

prints out the error traceback to stderr
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_ignore - - free the error chain
void nerr_ignore (NEOERR **err);

you should only call this if you actually handle the
error (should I rename it?). Free's the error chain.
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_register - - register a NEOERR type
NEOERR *nerr_register (NERR_TYPE *err, const char *name);

register an error type. This will assign a numeric value
to the type, and keep track of the "pretty name" for it.
Arguments: err - pointer to a NERR_TYPE
name - pretty name for the error type
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_raise -

Use this method to create an error "exception" for
return up the call chain
Arguments: using the macro, the function name, file, and lineno are
automagically recorded for you. You just provide the
error (from those listed above) and the printf-style
reason. THIS IS A PRINTF STYLE FUNCTION, DO NOT PASS
UNKNOWN STRING DATA AS THE FORMAT STRING.
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


nerr_handle - - walk the NEOERR chain for a matching error
int nerr_handle (NEOERR **err, NERR_TYPE type);

nerr_handle is a convenience function. It is the equivalent
of nerr_match, but it will also deallocate the error chain
on a match.
Arguments: err - pointer to a pointer NEOERR
type - the NEOERR type, as registered with nerr_register
Related Functions
nerr_error_traceback, nerr_pass, nerr_error_string, defined, nerr_pass_ctx, nerr_passf, nerr_init, nerr_warn_error, nerr_match, nerr_log_error, nerr_ignore, nerr_register, nerr_raise, nerr_handle,


hdf_set_symlink - - Set part of the tree to link to another
NEOERR *hdf_set_symlink (HDF *hdf, const char *src, const char *dest);

hdf_set_symlink creates a link between two sections of
an HDF dataset. The link is "by name" hence the term
"symlink". This means that the destination node does
not need to exist. Any attempt to access the source
node will cause the function to walk to the dest node,
and then continue walking from there. Using symlinks
can "hide" values in the dataset since you won't be able
to access any children of the linked node directly,
though dumps and other things which access the data
structure directly will bypass the symlink. Use this
feature sparingly as its likely to surprise you. None
Arguments: hdf -> the dataset node
src -> the source node name
dest -> the destination node name (from the top of the
dataset, not relative names)
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_valuef - - Return the value of a node in the data set
char* hdf_get_valuef (HDF *hdf, const char *namefmt, ...)
ATTRIBUTE_PRINTF(2,3);

hdf_get_valuef walks the data set pointed to by hdf via
namefmt printf expanded with varargs, and returns the
string value located there, or NULL if it doesn't exist.
This differs from hdf_get_value in that there is no
default value possible. None
Arguments: hdf -> the dataset node to start from
namefmt -> the printf-style format string
... -> arguments to fill out namefmt
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_dump_str - - dump an HDF dataset to STRING Description: Input: Output: Returns:
NEOERR* hdf_dump_str(HDF *hdf, const char *prefix, int compact, STRING *str);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_int_value - - Return the integer value of a point in the data set
int hdf_get_int_value (HDF *hdf, const char *name, int defval);

hdf_get_int_value walks the HDF data set pointed to by
hdf to name, and returns the value of that node
converted to an integer. If that node does not exist,
or it does not contain a number, the defval is returned. None
Arguments: hdf -> a node in an HDF data set
name -> the name of a node to walk to in the data set
defval -> value to return in case of error or if the node
doesn't exist
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_read_string_ignore - - Read an HDF string and ignore errors Description: Input: Output:
NEOERR* hdf_read_string_ignore (HDF *hdf, const char *s, int ignore);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_copy - - copy part of an HDF dataset to another
NEOERR* hdf_copy (HDF *dest_hdf, const char *name, HDF *src);

hdf_copy is a deep copy of an HDF tree pointed to by
src to the named node of dest. dest and src need not be
part of the same data set None
Arguments: dest_hdf -> the destination dataset
name -> the name of the destination node
src -> the hdf dataset to copy to the destination
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_node - - Similar to hdf_get_obj except all the nodes are created if the don't exist.
NEOERR * hdf_get_node (HDF *hdf, const char *name, HDF **ret);

hdf_get_node is similar to hdf_get_obj, except instead
of stopping if it can't find a node in the tree, it will
create all of the nodes necessary to hand you back the
node you ask for. Nodes are created with no value. ret -> the dataset node you asked for
Arguments: hdf -> the dataset node to start from
name -> the name to walk to
Output: ret -> the dataset node you asked for
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_set_value - - Set the value of a named node
NEOERR* hdf_set_value (HDF *hdf, const char *name, const char *value);

hdf_set_value will set the value of a named node. All
of the interstitial nodes which don't exist will be
created with a value of NULL. Existing nodes are not
modified. New nodes are created at the end of the list.
If a list of nodes exceeds FORCE_HASH_AT, then a HASH
will be created at that level and all of the nodes will
be added to the hash for faster lookup times.
The copy of the value will be made which the dataset
will own. None
Arguments: hdf -> the pointer to the hdf dataset
name -> the named node to walk to
value -> the value to set the node to
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_obj_child - - Return the first child of a dataset node
HDF* hdf_obj_child (HDF *hdf);

hdf_obj_child and the other hdf_obj_ functions are
accessors to the HDF dataset. Although we do not
currently "hide" the HDF struct implementation, we
recommend you use the accessor functions instead of
accessing the values directly. None
Arguments: hdf -> the hdf dataset node
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_read_string - - read an HDF string Description: Input: Output:
NEOERR* hdf_read_string (HDF *hdf, const char *s);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_set_buf - - Set the value of a node without duplicating the value
NEOERR* hdf_set_buf (HDF *hdf, const char *name, char *value);

hdf_set_buf is similar to hdf_set_value, except the
dataset takes ownership of the value instead of making a
copy of it. The dataset assumes that value was
malloc'd, since it will attempt to free it when
hdf_destroy is called None
Arguments: hdf -> the hdf dataset node
name -> the name to walk to
value -> the malloc'd value
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_register_fileload - - register a fileload function
void hdf_register_fileload(HDF *hdf, void *ctx, HDFFILELOAD fileload);

hdf_register_fileload registers a fileload function that
overrides the built-in function. The built-in function
uses hdf_search_path and ne_file_load (based on stat/open/read)
to find and load the file on every hdf_read_file (including
#include). You can override this function if you wish to provide
other file search functions, or load the hdf file
from an in-memory cache, etc. None
Arguments: hdf - pointer to a head HDF node
ctx - pointer that is passed to the HDFFILELOAD function when called
fileload - a HDFFILELOAD function
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_obj - - return the HDF data set node at a named location
HDF* hdf_get_obj (HDF *hdf, const char *name);

hdf_get_obj walks the dataset given by hdf to the node
named name, and then returns the pointer to that node None
Arguments: hdf -> the dataset node to start from
name -> the name to walk to
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_attr - - Description: Input: Output: Returns:
HDF_ATTR* hdf_get_attr (HDF *hdf, const char *name);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_obj_top - - Return the pointer to the top dataset node
HDF* hdf_obj_top (HDF *hdf);

hdf_obj_top is an accessor function which returns a
pointer to the top of the dataset, the node which was
returned by hdf_init. This is most useful for
implementations of language wrappers where individual
nodes are tied garbage colletion wise to the top node of
the data set None
Arguments: hdf -> the hdf dataset node
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_dump_format - - dump an HDF dataset to FILE *fp Description: Input: Output: Returns:
NEOERR* hdf_dump_format (HDF *hdf, int lvl, FILE *fp);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_destroy - - deallocate an HDF data set
void hdf_destroy (HDF **hdf);

hdf_destroy is used to deallocate all memory associated
with an hdf data set. Although you can pass an HDF node
as an argument to this function, you are likely to cause
a segfault if you continue to access the data set. In
the future, we may restrict hdf_destroy so it only works
on the top level node. None
Arguments: hdf - pointer to an HDF data set allocated with hdf_init
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_init - - Initialize an HDF data set
NEOERR* hdf_init (HDF **hdf);

hdf_init initializes an HDF data set and returns the
pointer to the top node in the data set. hdf - allocated hdf node
Arguments: hdf - pointer to an HDF pointer
Output: hdf - allocated hdf node
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_obj_value - - Return the value of a node
char* hdf_obj_value (HDF *hdf);

hdf_obj_value is an accessor function for a dataset node
which returns the value of the node, or NULL if the node
has no value. This is not a copy of the value, so the
node retains ownership of the value None
Arguments: hdf -> the hdf dataset node
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_write_string - - serialize an HDF dataset to a string Description: Input: Output:
NEOERR* hdf_write_string (HDF *hdf, char **s);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_sort_obj - - sort the children of an HDF node

hdf_sort_obj will sort the children of an HDF node,
based on the given comparison function.
This function works by creating an array of the pointers
for each child object of h, using qsort to sort that
array, and then re-ordering the linked list of children
to the new order. The qsort compare function uses a
pointer to the value in the array, which in our case is
a pointer to an HDF struct, so your comparison function
should work on HDF ** pointers. None (h children will be sorted)
Arguments: h - HDF node
compareFunc - function which returns 1,0,-1 depending on some
criteria. The arguments to this sort function
are pointers to pointers to HDF elements. For
example:
int sortByName(const void *a, const void *b) {
HDF **ha = (HDF **)a;
HDF **hb = (HDF **)b;
*
return strcasecmp(hdf_obj_name(*ha), hdf_obj_name(*hb));
}
*
Output: None (h children will be sorted)
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_write_file_atomic - - write an HDF data file atomically
NEOERR* hdf_write_file_atomic (HDF *hdf, const char *path);

hdf_write_file_atomic is similar to hdf_write_file,
except the new file is created with a unique name and
then rename(2) is used to atomically replace the old
file with the new file
Input:
Output:
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_obj_attr - - Return the HDF Attributes for a node Description: Input: Output: Returns:
HDF_ATTR* hdf_obj_attr (HDF *hdf);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_set_valuef - - Set the value of a named node
NEOERR* hdf_set_valuef (HDF *hdf, const char *fmt, ...)
ATTRIBUTE_PRINTF(2,3);

hdf_set_valuef is a convenience function that wraps
hdf_set_value. Due to limitations of C, the fmt is in
the format "name=value", where we will first format the
entire string, and then break it at the first (from the
left) equal sign (=) and use the left portion as the
name and the right portion as the value. This function
is somewhat inefficient in that it first allocates the
full name=value, and then the call to hdf_set_value
duplicates the value portion, and then we free the
name=value.
Currently, we don't strip whitespace from the key or
value. In the future, this function might work more
like reading a single line of an HDF string or file,
allowing for attributes and symlinks to be specified...
maybe. None
Arguments: hdf -> the pointer to the hdf dataset
fmt -> the name=value printf(3) format string
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_copy - - Returns a copy of a string in the HDF data set
NEOERR* hdf_get_copy (HDF *hdf, const char *name, char **value,
const char *defval);

hdf_get_copy is similar to hdf_get_value, except that it
returns an malloc'd copy of the string. value -> the allocated string (if defval = NULL, then value
will be NULL if defval is used)
Arguments: hdf -> the dataset node to start from
name -> the name to walk the data set to
defval -> the default value to return if the node doesn't
exist
Output: value -> the allocated string (if defval = NULL, then value
will be NULL if defval is used)
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_write_file - - write an HDF data file Description: Input: Output:
NEOERR* hdf_write_file (HDF *hdf, const char *path);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_valuevf - - Return the value of a node in the data set
char* hdf_get_valuevf (HDF *hdf, const char *namefmt, va_list ap);

hdf_get_valuevf walks the data set pointed to by hdf via
namefmt printf expanded with varargs ap, and returns the
string value located there, or NULL if it doesn't exist.
This differs from hdf_get_value in that there is no
default value possible. None
Arguments: hdf -> the dataset node to start from
namefmt -> the format string
ap -> va_list of varargs
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_set_int_value - - Set the value of a named node to a number
NEOERR* hdf_set_int_value (HDF *hdf, const char *name, int value);

hdf_set_int_value is a helper function that maps an
integer to a string, and then calls hdf_set_value with
that string None
Arguments: hdf -> the pointer to the hdf dataset
name -> the named node to walk to
value -> the value to set the node to
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_dump - - dump an HDF dataset to stdout Description: Input: Output: Returns:
NEOERR* hdf_dump (HDF *hdf, const char *prefix);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_value - - Return the value of a node in the data set
char *hdf_get_value (HDF *hdf, const char *name, const char *defval);

hdf_get_value walks the data set pointed to by hdf via
name and returns the string value located there, or
defval if the node doesn't exist None
Arguments: hdf -> the dataset node to start from
name -> the name to walk the data set to
defval -> the default value to return if the node doesn't
exist
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_set_copy - - Copy a value from one location in the dataset to another
NEOERR* hdf_set_copy (HDF *hdf, const char *dest, const char *src);

hdf_set_copy first walks the hdf dataset to the named src
node, and then copies that value to the named dest node.
If the src node is not found, an error is raised. None
Arguments: hdf -> the pointer to the dataset node
dest -> the name of the destination node
src -> the name of the source node
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_obj_next - - Return the next node of a dataset level
HDF* hdf_obj_next (HDF *hdf);

hdf_obj_next is an accessor function for the HDF struct None
Arguments: hdf -> the hdf dataset node
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_search_path - - Find a file given a search path in HDF
NEOERR* hdf_search_path (HDF *hdf, const char *path, char *full, int full_len);

hdf_search_path is a convenience/utility function that
searches for relative filenames in a search path. The
search path is the list given by the children of
hdf.loadpaths. full -> the full path of the file
Arguments: hdf -> the hdf dataset to use
path -> the relative path
full -> a pointer to a buffer
full_len -> size of full buffer
Output: full -> the full path of the file
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_obj_name - - Return the name of a node
char* hdf_obj_name (HDF *hdf);

hdf_obj_name is an accessor function for a datset node
which returns the name of the node. This is just the
local name, and not the full path. None
Arguments: hdf -> the hdf dataset node
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_set_attr - - Description: Input: Output: Returns:
NEOERR* hdf_set_attr (HDF *hdf, const char *name, const char *key,
const char *value);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_get_child - - return the first child of the named node
HDF* hdf_get_child (HDF *hdf, const char *name);

hdf_get_child will walk the dataset starting at hdf to
name, and return the first child of that node None
Arguments: hdf -> the dataset node to start from
name -> the name to walk to
Output: None
Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


hdf_remove_tree - - delete a subtree of an HDF dataset Description: Input: Output: Returns:
NEOERR* hdf_remove_tree (HDF *hdf, const char *name);

Related Functions
hdf_set_symlink, hdf_get_valuef, compareFunc), hdf_dump_str, hdf_get_int_value, hdf_read_string_ignore, hdf_copy, hdf_get_node, hdf_set_value, hdf_obj_child, hdf_read_string, hdf_set_buf, hdf_register_fileload, hdf_get_obj, hdf_get_attr, hdf_obj_top, hdf_dump_format, hdf_destroy, hdf_init, hdf_obj_value, hdf_write_string, hdf_set_valuevf, hdf_sort_obj, hdf_write_file_atomic, hdf_obj_attr, hdf_set_valuef, hdf_get_copy, hdf_write_file, hdf_get_valuevf, hdf_set_int_value, hdf_dump, hdf_get_value, hdf_set_copy, hdf_obj_next, hdf_search_path, hdf_obj_name, hdf_set_attr, hdf_get_child, hdf_remove_tree,


ne_log -

Output's a log entry to stderr with the configured prefix
if level <= the value set by ne_set_log
Arguments: level - NE_LOG level.
fmt - printf-style format string
The macro insures that the function name, file, and lineno are
passed, they are only displayed if configured to do so.
Related Functions
gmtime_r, vsnprintf, ne_log, ne_unstream2, ne_unstream_str, ATTRIBUTE_PRINTF, snprintf, ne_timef, defined, ne_stream_str, ne_set_log, ne_set_log_options, ne_unstream4, localtime_r, ne_crc, ne_warn, ne_stream4, mkstemp, ne_vwarn, ne_stream2,


ne_set_log -
void ne_set_log (int level);

Set logging level
Arguments: log entries <= level are logged, higher ones are ignored.
default is NE_LOG_WARN.
Setting is global.
Related Functions
gmtime_r, vsnprintf, ne_log, ne_unstream2, ne_unstream_str, ATTRIBUTE_PRINTF, snprintf, ne_timef, defined, ne_stream_str, ne_set_log, ne_set_log_options, ne_unstream4, localtime_r, ne_crc, ne_warn, ne_stream4, mkstemp, ne_vwarn, ne_stream2,


ne_set_log_options -
void ne_set_log_options(int display_options);

Set display options for logging
Arguments: Bitmask of NE_LOG_DISPLAY* bits to enable various display options
for the log prefix. Default is just NE_LOG_DISPLAY_DATETIME.
Setting is global.
Related Functions
gmtime_r, vsnprintf, ne_log, ne_unstream2, ne_unstream_str, ATTRIBUTE_PRINTF, snprintf, ne_timef, defined, ne_stream_str, ne_set_log, ne_set_log_options, ne_unstream4, localtime_r, ne_crc, ne_warn, ne_stream4, mkstemp, ne_vwarn, ne_stream2,


ne_warn -

Output log entry at warning level to stderr with
the configured prefix
Arguments: This version takes a printf-style format string and variable
arguments.
The macro insures that the function name, file, and lineno are
passed, they are only displayed if configured to do so.
Related Functions
gmtime_r, vsnprintf, ne_log, ne_unstream2, ne_unstream_str, ATTRIBUTE_PRINTF, snprintf, ne_timef, defined, ne_stream_str, ne_set_log, ne_set_log_options, ne_unstream4, localtime_r, ne_crc, ne_warn, ne_stream4, mkstemp, ne_vwarn, ne_stream2,


ne_vwarn -

Output log entry at warning level to stderr with
the configured prefix
Arguments: This version takes a printf-style format string and a va_list.
The macro insures that the function name, file, and lineno are
passed, they are only displayed if configured to do so.
Related Functions
gmtime_r, vsnprintf, ne_log, ne_unstream2, ne_unstream_str, ATTRIBUTE_PRINTF, snprintf, ne_timef, defined, ne_stream_str, ne_set_log, ne_set_log_options, ne_unstream4, localtime_r, ne_crc, ne_warn, ne_stream4, mkstemp, ne_vwarn, ne_stream2,


skipDelete - - delete an item.
void skipDelete(skipList list, UINT32 key);

Delete the item associated with <key> from <list>. None.
Arguments: list - list to delete item from.
key - key identifying value to delete.
Output: None.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


skipFreeList - - free a skip list.
void skipFreeList(skipList list);

Release all resources used by <list> including all key/value
pairs. None.
Arguments: list - list to free.
Output: None.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


skipRelease - - release lock on value.
void skipRelease(skipList list, void *lock);

Releases the lock on the value associated with <lock>. Once
the lock is released, the freeValue callback can be called
and the item freed (see skipNewList()). None.
Arguments: list - list containing value to release.
lock - lock to release.
Output: None.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


skipInsert - - insert an item.
NEOERR *skipInsert(skipList list, UINT32 key, void *value, int allowUpdate);

Inserts the <key>/<value> pair into the <list>.
Key values 0 and -1 are reserved (and illegal).
If key is already in list, and <allowUpdate> is true,
value is updated, otherwise SKIPERR_EXISTS is returned. None.
Arguments: list - list to add pair to.
key - key identifying <value>.
value - value to store (may NOT be NULL)
Output: None.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


skipSearch - - search a skip list.
void *skipSearch(skipList list, UINT32 key, void **plock);

Searches for <key> in <list>, and returns value if
found, or NULL if not. If <plock> is non-NULL, then
the lock returned in <plock> will be associated with
the returned value. Until this lock is passed to
skipRelease(), the value will not be freed with the
freeValue callback (see skipNewList()). plock - set to value lock.
Arguments: list - list to search in.
key - key to look for.
plock - place for value lock (or NULL).
Output: plock - set to value lock.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


skipNext - - find next item.
void *skipNext(skipList list, UINT32 *pkey, void **plock);

Searches in list <list> for item with key next larger
that the one in <pkey>, and returns its value if
found, or NULL if not. If <plock> is non-NULL, then
the lock returned in <plock> will be associated with
the returned value. Until this lock is passed to
skipRelease(), the value will not be freed with the
freeValue callback (see skipNewList()). pkey - set to new key.
plock - set to value lock.
Arguments: list - list to search in.
pkey - pointer to previous key (0 to start).
plock - place for value lock (or NULL).
Output: pkey - set to new key.
plock - set to value lock.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


skipNewList - - create a skip list.
NEOERR *skipNewList(skipList *skip, int threaded, int root, int maxLevel,
int flushLimit, skipFreeValue freeValue, void *ctx);

Returns a new skip list. If <threaded> is true, list is
multi-thread safe. <root> and <maxLevel> determine
performance and expected size (see discussion above).
<flushLimit> is for threaded lists and determines the
maximum number of deleted items to keep cached during
concurrent searches. Once the limit is reached, new
concurrent reads are blocked until all deleted items are
flushed. None.
Arguments: threaded - true if list should be thread-safe.
root - performance parameter (see above).
maxLevel - performance parameter (see above).
flushLimit - max deleted items to keep cached before
forcing a flush.
freeValue - callback made whenever a value is flushed.
ctx - context to pass to <freeValue>.
Output: None.
Related Functions
skipDelete, skipFreeList, skipRelease, skipInsert, skipSearch, skipNext, skipNewList,


mCreate - - initialize a mutex.
NEOERR *mCreate(pthread_mutex_t *mutex);

Initializes the mutex <mutex>. None.
Arguments: mutex - mutex to initialize.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


fCreate - - create a file lock.
NEOERR *fCreate(int *plock, const char *file);

Creates a file lock on named file <file>. The lock is
returned in <plock>. plock - set to lock identifier.
Arguments: plock - place for lock.
file - path of file to use as lock.
Output: plock - set to lock identifier.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


mUnlock - - unlock a mutex.
NEOERR *mUnlock(pthread_mutex_t *mutex);

Unlocks the mutex <mutex>. None.
Arguments: mutex - mutex to unlock.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


fUnlock - - release file lock.
void fUnlock(int lock);

Releases the lock identified by <lock>. None.
Arguments: lock - Lock to release.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


cBroadcast - - broadcast signal to all waiting threads.
NEOERR *cBroadcast(pthread_cond_t *cond);

Broadcasts a signal to all threads waiting on condition
variable <cond>. None.
Arguments: cond - condition variable to broadcast on.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


cSignal - - send signal to one waiting thread.
NEOERR *cSignal(pthread_cond_t *cond);

Sends a signal to one thread waiting on condition
variable <cond>. None.
Arguments: cond - condition variable to send signal on.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


fFind - - find a file lock.
NEOERR *fFind(int *plock, const char *file);

Find a file identified by the path <file>, and returns a
lock identifier for it in <plock>. If the file doesn't
exist, returns true. plock - set to lock identifier.
Arguments: plock - place for lock.
file - path of file to use as lock.
Output: plock - set to lock identifier.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


cDestroy - - destroy a condition variable.
void cDestroy(pthread_cond_t *cond);

Destroys the condition variable <cond> that was
initialized by cCreate(). None.
Arguments: cond - condition variable to destroy.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


cCreate - - initialize a condition variable.
NEOERR *cCreate(pthread_cond_t *cond);

Initializes the condition variable <cond>. None.
Arguments: cond - condition variable to initialize.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


mDestroy - - destroy a mutex.
void mDestroy(pthread_mutex_t *mutex);

Destroys the mutex <mutex> that was initialized by mCreate(). None.
Arguments: mutex - mutex to destroy.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


cWait - - wait a condition variable signal.
NEOERR *cWait(pthread_cond_t *cond, pthread_mutex_t *mutex);

Waits for a signal on condition variable <cond>.
The mutex <mutex> must be locked by the thread. None.
Arguments: cond - condition variable to wait on.
mutex - locked mutex to protect <cond>.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


fLock - - acquire file lock.
NEOERR *fLock(int lock);

Acquires the lock identified by <lock>. This call
blocks until the lock is acquired. None.
Arguments: lock - Lock to acquire.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


fDestroy - - destroy a lock.
void fDestroy(int lock);

Destroys the lock <lock> that was created by fCreate()
or fFind(). None.
Arguments: lock - Lock to destroy.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


mLock - - lock a mutex.
NEOERR *mLock(pthread_mutex_t *mutex);

Locks the mutex <mutex>. This call blocks until the mutex
is acquired. None.
Arguments: mutex - mutex to lock.
Output: None.
Related Functions
mCreate, fCreate, mUnlock, fUnlock, cBroadcast, cSignal, fFind, cDestroy, cCreate, mDestroy, cWait, fLock, fDestroy, mLock,


wdb_keys - - returns the primary key and columns for the db
NEOERR * wdb_keys (WDB *wdb, char **primary_key, ULIST **data);

this function returns the key and column names for the
current database primary_key - pointer to the primary key
data - pointer to a ULIST of the columns.
both of these are allocated structures, you can clear data
with uListDestroy (data, ULIST_FREE)
Arguments: wdb - open database
Output: primary_key - pointer to the primary key
data - pointer to a ULIST of the columns.
both of these are allocated structures, you can clear data
with uListDestroy (data, ULIST_FREE)