Author: tpot Date: 2005-01-09 05:31:59 +0000 (Sun, 09 Jan 2005) New Revision: 4613
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4613 Log: Fix stuff I broke in the last commit with the /x regexp flag. Modified: branches/SAMBA_4_0/source/build/pidl/eparser.pm Changeset: Modified: branches/SAMBA_4_0/source/build/pidl/eparser.pm =================================================================== --- branches/SAMBA_4_0/source/build/pidl/eparser.pm 2005-01-09 04:31:32 UTC (rev 4612) +++ branches/SAMBA_4_0/source/build/pidl/eparser.pm 2005-01-09 05:31:59 UTC (rev 4613) @@ -343,7 +343,8 @@ # Rewrite librpc includes - s/^\#include \"librpc\/gen_ndr\/ndr_(.*?).h\"$/\#include \"packet-dcerpc-$1.h\"/smg; + s/^\#include\ \"librpc\/gen_ndr\/ndr_(.*?).h\"$ + /\#include \"packet-dcerpc-$1.h\"/smgx; # Convert samba fixed width types to stdint types @@ -440,8 +441,7 @@ # they are also not very interesting. s/^static const struct dcerpc_interface_call .*?^\};\n\n//smg; - s/^static const char \* const - ([a-z]+)_endpoint_strings.*?^\};\n\n//smgx; + s/^static const char \* const ([a-z]+)_endpoint_strings.*?^\};\n\n//smgx; s/^static const struct dcerpc_endpoint_list .*?^\};\n\n\n//smg; s/^const struct dcerpc_interface_table .*?^\};\n\n//smg; s/^static NTSTATUS dcerpc_ndr_([a-z]+)_init.*?^\}\n\n//smg; @@ -459,32 +459,32 @@ # Add proto tree and hf argument to ndr_pull_ptr() calls. - s/(ndr_pull_ptr\(ndr, ([^\)]*?)\);)/ - ndr_pull_ptr(ndr, tree, hf_ptr, $2);/smgx; + s/(ndr_pull_ptr\(ndr,\ ([^\)]*?)\);) + /ndr_pull_ptr(ndr, tree, hf_ptr, $2);/smgx; # Wrap ndr_pull_array_size() and ndr_pull_array_length() # functions. Add leading space in front of first parameter so # we won't get caught by later regexps. - s/(ndr_pull_array_(size|length)\(ndr, ([^\)]*?)\);)/ - ndr_pull_array_$2( ndr, tree, $3);/smgx; + s/(ndr_pull_array_(size|length)\(ndr,\ ([^\)]*?)\);) + /ndr_pull_array_$2( ndr, tree, $3);/smgx; # Add tree argument to ndr_pull_array() and # ndr_pull_array_foo() calls. s/(ndr_pull_array\( - ndr, - ([^,]*?), # NDR_SCALARS etc - (\(void \*\*\)r->(in|out|)\.?([^,]*?)), # Pointer to array entries - ([^\)].*?)\);)/ # All other arguments - ndr_pull_array( ndr, $2, tree, $3, $6);/smgx; + ndr,\ + ([^,]*?),\ # NDR_SCALARS etc + (\(void\ \*\*\)r->(in|out|)\.?([^,]*?)),\ # Pointer to array entries + ([^\)].*?)\);) # All other arguments + /ndr_pull_array( ndr, $2, tree, $3, $6);/smgx; - s/(ndr_pull_array_([^\(]*?)\( - ndr, - ([^,]*?), # NDR_SCALARS etc - (r->((in|out).)?([^,]*?)), # Pointer to array elements - (.*?)\);)/ # Number of elements - ndr_pull_array_$2( ndr, $3, tree, hf_$7_$2_array, $4, $8);/smgx; + s/(ndr_pull_array_([^\(]*?)\( + ndr,\ + ([^,]*?),\ # NDR_SCALARS etc + (r->((in|out).)?([^,]*?)),\ # Pointer to array elements + (.*?)\);) # Number of elements + /ndr_pull_array_$2( ndr, $3, tree, hf_$7_$2_array, $4, $8);/smgx; # Save ndr_pull_relative{1,2}() calls from being wrapped by the # proceeding regexp by adding a leading space. @@ -498,21 +498,21 @@ # ndr_pull_uint32(ndr, &r->in.access_mask); # ndr_pull_uint32(ndr, &r->idx); - s/(ndr_pull_([^\)]*?)\( - ndr, + s/(ndr_pull_([^\)]*?) + \(ndr,\ (&?r->((in|out)\.)? # Function args contain leading junk ([^\)]*?)) # Element name - \);)/ - ndr_pull_$2(ndr, tree, hf_$6_$2, $3);/smgx; + \);) + /ndr_pull_$2(ndr, tree, hf_$6_$2, $3);/smgx; # Add tree and hf argument to pulls of "internal" scalars like # array sizes, levels, etc. s/(ndr_pull_(uint32|uint16)\( - ndr, + ndr,\ (&_([^\)]*?)) # Internal arg names have leading underscore - \);)/ - ndr_pull_$2(ndr, tree, hf_$4, $3);/smgx; + \);) + /ndr_pull_$2(ndr, tree, hf_$4, $3);/smgx; # Add subtree argument to calls dissecting structures, e.g # @@ -520,20 +520,21 @@ # ndr_pull_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr); s/(ndr_pull_([^\)]*?)\( - ndr, - (NDR_[^,]*?), - ([^\(].*?)\);)/ - ndr_pull_$2(ndr, $3, get_subtree(tree, \"$2\", ndr, ett_$2), $4);/smgx; + ndr,\ + (NDR_[^,]*?),\ + ([^\(].*?)\);) + /ndr_pull_$2(ndr, $3, get_subtree(tree, \"$2\", ndr, ett_$2), $4); + /smgx; # Add proto_tree parameter to pull function prototypes, e.g # # static NTSTATUS ndr_pull_atsvc_JobInfo(struct ndr_pull *ndr, # int ndr_flags, struct atsvc_JobInfo *r) - s/^((static )?NTSTATUS ndr_pull_([^\(]*?)\( - struct ndr_pull \*ndr, - int (ndr_)?flags)/ - $1, proto_tree \*tree/smgx; + s/^((static\ )?NTSTATUS\ ndr_pull_([^\(]*?)\( + struct\ ndr_pull\ \*ndr,\ + int\ (ndr_)?flags) + /$1, proto_tree \*tree/smgx; # Add proto_tree parameter to ndr_pull_subcontext_flags_fn() @@ -557,24 +558,24 @@ # Fix some internal variable declarations s/uint(16|32) _level/uint$1_t _level/smg; - s/ndr_pull_([^\(]*)\(ndr, tree, hf_level, &_level\);/ - ndr_pull_$1(ndr, tree, hf_level_$1, &_level);/smgx; + s/ndr_pull_([^\(]*)\(ndr,\ tree,\ hf_level,\ &_level\); + /ndr_pull_$1(ndr, tree, hf_level_$1, &_level);/smgx; # Enums - s/(^static NTSTATUS ndr_pull_(.+?), (enum .+?)\))/ - static NTSTATUS ndr_pull_$2, pidl_tree *tree, int hf, $3)/smgx; + s/(^static\ NTSTATUS\ ndr_pull_(.+?),\ (enum .+?)\)) + /static NTSTATUS ndr_pull_$2, pidl_tree *tree, int hf, $3)/smgx; s/uint(8|16|32) v;/uint$1_t v;/smg; - s/(ndr_pull_([^\)]*?)\(ndr, &v\);)/ - ndr_pull_$2(ndr, tree, hf, &v);/smgx; + s/(ndr_pull_([^\)]*?)\(ndr,\ &v\);) + /ndr_pull_$2(ndr, tree, hf, &v);/smgx; - s/(ndr_pull_([^\(]+?)\(ndr, &_level\);)/ - ndr_pull_$2(ndr, tree, hf_$2, &_level);/smgx; + s/(ndr_pull_([^\(]+?)\(ndr,\ &_level\);) + /ndr_pull_$2(ndr, tree, hf_$2, &_level);/smgx; # Bitmaps - s/(^NTSTATUS ndr_pull_(.+?), uint32 \*r\))/ - NTSTATUS ndr_pull_$2, pidl_tree *tree, int hf, uint32_t *r)/smgx; + s/(^NTSTATUS\ ndr_pull_(.+?),\ uint32\ \*r\)) + /NTSTATUS ndr_pull_$2, pidl_tree *tree, int hf, uint32_t *r)/smgx; pidl $_; }