summaryrefslogtreecommitdiff
path: root/source3/aparser/parser.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-16 11:55:06 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-16 11:55:06 +0000
commitf3a3a05ade784ff6906e5c8b132c9440a8db44e5 (patch)
tree35f1cfbb0a880a592487450c5a9b8d37cfe302b9 /source3/aparser/parser.h
parent466338b165a19149e7a938bf4302c95dcab82beb (diff)
downloadsamba-f3a3a05ade784ff6906e5c8b132c9440a8db44e5.tar.gz
samba-f3a3a05ade784ff6906e5c8b132c9440a8db44e5.tar.bz2
samba-f3a3a05ade784ff6906e5c8b132c9440a8db44e5.zip
another awk parser update
we can now handle arrays of structures, pointers to structures, pointers in unions etc (This used to be commit 1df80cd1e8475b6b2fe7b80b6c9089692ab7691b)
Diffstat (limited to 'source3/aparser/parser.h')
-rw-r--r--source3/aparser/parser.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/aparser/parser.h b/source3/aparser/parser.h
index 353a879cb7..7d4425ed3e 100644
--- a/source3/aparser/parser.h
+++ b/source3/aparser/parser.h
@@ -1,6 +1,9 @@
#include <ctype.h>
#include "../include/byteorder.h"
+#define PARSE_SCALARS (1<<0)
+#define PARSE_BUFFERS (1<<1)
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
@@ -54,15 +57,16 @@ typedef struct _prs_struct
char *prs_mem_get(prs_struct *ps, uint32 extra_size);
-BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32);
BOOL prs_init(prs_struct *ps, uint32 size, uint8 align, BOOL io);
void prs_debug(prs_struct *ps, int depth, char *desc, char *fn_name);
BOOL prs_align(prs_struct *ps);
void print_asc(int level, unsigned char *buf,int len);
BOOL prs_read(prs_struct *ps, int fd, size_t len, int timeout);
void dump_data(int level,char *buf1,int len);
-BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
-BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
-BOOL prs_pointer(char *desc, prs_struct *ps, int depth, void **p);
-BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16);
+BOOL io_alloc(char *name, prs_struct *ps, void **ptr, unsigned size);
+BOOL io_uint32(char *name, prs_struct *ps, int depth, uint32 *data32, unsigned flags);
+BOOL io_uint16(char *name, prs_struct *ps, int depth, uint16 *data16, unsigned flags);
+BOOL io_uint8(char *name, prs_struct *ps, int depth, uint8 *data8, unsigned flags);
+BOOL io_pointer(char *desc, prs_struct *ps, int depth, void **p, unsigned flags);
+BOOL io_wstring(char *name, prs_struct *ps, int depth, uint16 *data16s, int len, unsigned flags);