diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-15 10:35:28 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-15 10:35:28 +0000 |
commit | e90b65284812aaa5ff9e9935ce9bbad7791cbbcd (patch) | |
tree | 9e744d1dc2f93934a4b49166a37383d3cb2b2139 /source3/rpc_parse/parse_prs.c | |
parent | ec167dc9cc0ec2ee461837c25a371d2981744208 (diff) | |
download | samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.gz samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.bz2 samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.zip |
updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
Diffstat (limited to 'source3/rpc_parse/parse_prs.c')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 6d65d5cc7f..2ab8c7246e 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -22,6 +22,9 @@ #include "includes.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_PARSE + /** * Dump a prs to a file: from the current location through to the end. **/ @@ -73,7 +76,7 @@ void prs_dump_region(char *name, int v, prs_struct *ps, XXXX side-effect of this function is to increase the debug depth XXXX ********************************************************************/ -void prs_debug(prs_struct *ps, int depth, char *desc, char *fn_name) +void prs_debug(prs_struct *ps, int depth, const char *desc, char *fn_name) { DEBUG(5+depth, ("%s%06x %s %s\n", tab_depth(depth), ps->data_offset, fn_name, desc)); } @@ -444,6 +447,38 @@ BOOL prs_align(prs_struct *ps) return True; } +/****************************************************************** + Align on a 2 byte boundary + *****************************************************************/ + +BOOL prs_align_uint16(prs_struct *ps) +{ + BOOL ret; + uint8 old_align = ps->align; + + ps->align = 2; + ret = prs_align(ps); + ps->align = old_align; + + return ret; +} + +/****************************************************************** + Align on a 8 byte boundary + *****************************************************************/ + +BOOL prs_align_uint64(prs_struct *ps) +{ + BOOL ret; + uint8 old_align = ps->align; + + ps->align = 8; + ret = prs_align(ps); + ps->align = old_align; + + return ret; +} + /******************************************************************* Align only if required (for the unistr2 string mainly) ********************************************************************/ |