--- psiconv/trunk/lib/psiconv/parse_routines.h 2000/12/13 16:30:21 63 +++ psiconv/trunk/lib/psiconv/parse_routines.h 2000/12/22 22:31:50 71 @@ -20,50 +20,39 @@ #ifndef PSICONV_PARSE_ROUTINES_H #define PSICONV_PARSE_ROUTINES_H -#include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/* *************** - * misc.c * - *************** */ - -/* This function returns a copy of a string, that contains no ASCII codes - that are not printable. You should free this string yourself when you are - done with it. Returns NULL if there is not enough memory left. */ -extern char *psiconv_make_printable(const char *s); - -/* ************** - * checkuid.c * - ************** */ - -extern psiconv_u32 psiconv_checkuid(psiconv_u32 uid1, - psiconv_u32 uid2,psiconv_u32 uid3); - /* ****************** * parse_simple.c * ****************** */ extern psiconv_u8 psiconv_read_u8(const psiconv_buffer buf,int lev, - psiconv_u32 off); + psiconv_u32 off, int *status); extern psiconv_u16 psiconv_read_u16(const psiconv_buffer buf,int lev, - psiconv_u32 off); + psiconv_u32 off, int *status); extern psiconv_u32 psiconv_read_u32(const psiconv_buffer buf,int lev, - psiconv_u32 off); + psiconv_u32 off, int *status); extern psiconv_S_t psiconv_read_S(const psiconv_buffer buf, int lev, - psiconv_u32 off, int *length); + psiconv_u32 off, int *length, int *status); extern psiconv_X_t psiconv_read_X(const psiconv_buffer buf, int lev, - psiconv_u32 off, int *length); + psiconv_u32 off, int *length, int *status); extern psiconv_length_t psiconv_read_length(const psiconv_buffer buf, int lev, - psiconv_u32 off, int *length); + psiconv_u32 off, int *length, + int *status); extern psiconv_size_t psiconv_read_size (const psiconv_buffer buf, int lev, - psiconv_u32 off, int *length); + psiconv_u32 off, int *length, + int *status); extern psiconv_string_t psiconv_read_string(const psiconv_buffer buf,int lev, - psiconv_u32 off,int *length); + psiconv_u32 off,int *length, + int *status); extern int psiconv_parse_bool(const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, @@ -94,6 +83,12 @@ psiconv_u32 off, int *length, psiconv_tab *result); +/* Note: the next two are special, because they modify an existing + layout structure! If it exits due to an unexpected error, part + of the structure may be modified, but it is still safe to call + psiconv_free_{paragraph,character}_layout_list on it (and that + is the only safe thing to do!) */ + extern int psiconv_parse_paragraph_layout_list(const psiconv_buffer buf, int lev, psiconv_u32 off, int *length, psiconv_paragraph_layout result);