next up previous contents index
Next: Error conditions Up: Header StringInput.h Previous: Header StringInput.h   Contents   Index

Synopsis

#include "StringInput.h"

This header provides prototypes for routines that construct LAL data structures using the data from a character string. As in standard C, a string is a block of non-null bytes of arbitrary length, terminated by a null byte '\0', and referred to by a value of type CHAR * pointing to the first byte in the string. It is not to be confused with a CHARVector, a LAL structure referring to a block of data of a specified length, which may or may not contain one or more instances of '\0'.

In general, the routines under this header will have string inputs of type const CHAR * (in order to allow, for instance, string literals to be used as inputs), but will allocate CHARVector structures to store string outputs. Unless otherwise specified, these outputs are guaranteed to contain at least one '\0' character, so their data fields are valid strings. It is the responsibility of the calling routine to ensure that the string input contains a terminating '\0' within the memory segment pointed to by the CHAR * input, in order to avoid segmentation violation.

These routines are intended to work in conjunction with the functions in StreamInput.h to add LAL robustness to otherwise ad-hoc data input routines. However, the functions in StringInput.h are fully LAL-compliant and use only LAL types, so they are included in liblal proper.


next up previous contents index
Next: Error conditions Up: Header StringInput.h Previous: Header StringInput.h   Contents   Index
LAL test account 2003-10-23