comparison src/xs_support.h @ 955:3c2efa18c422

Change semantics of xs_fread_be{32,16}() functions to match xs_fread_str() and xs_fread_byte() and change the PSID/RSID file parsing for SLDB MD5 calculation to use them. Also, fix the parser so that PSID/RSID v3 files are supported correctly.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 20 Nov 2012 21:28:39 +0200
parents b2caef664524
children 0233c5fd7d5e
comparison
equal deleted inserted replaced
954:a5b118c853f5 955:3c2efa18c422
124 #define xs_ftell(a) ftell(a) 124 #define xs_ftell(a) ftell(a)
125 #define xs_fseek(a,b,c) fseek(a,b,c) 125 #define xs_fseek(a,b,c) fseek(a,b,c)
126 off_t xs_fsize(XSFile *f); 126 off_t xs_fsize(XSFile *f);
127 #endif 127 #endif
128 128
129 guint16 xs_fread_be16(XSFile *);
130 guint32 xs_fread_be32(XSFile *);
131 gboolean xs_fread_str(XSFile *, void *, const size_t); 129 gboolean xs_fread_str(XSFile *, void *, const size_t);
132 gboolean xs_fread_byte(XSFile *, guint8 *); 130 gboolean xs_fread_byte(XSFile *, guint8 *);
131 gboolean xs_fread_be16(XSFile *, guint16 *);
132 gboolean xs_fread_be32(XSFile *, guint32 *);
133
133 gboolean xs_fload_buffer(const gchar *filename, 134 gboolean xs_fload_buffer(const gchar *filename,
134 guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize); 135 guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize);
135 gboolean xs_fload_buffer_path(const gchar *ppath, const gchar *pfilename, 136 gboolean xs_fload_buffer_path(const gchar *ppath, const gchar *pfilename,
136 guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize); 137 guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize);
137 138