diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-15 10:55:10 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-15 10:55:10 +0000 |
commit | 43e52cc177a6e2b112cd233f71a53c54bcb97265 (patch) | |
tree | 8bf0ae021ff45af766ac3581dee415ea7437a44e /source4/build/pidl/pidl.pl | |
parent | 5b0359652912baee3767d14d394eb951301c0e8f (diff) | |
download | samba-43e52cc177a6e2b112cd233f71a53c54bcb97265.tar.gz samba-43e52cc177a6e2b112cd233f71a53c54bcb97265.tar.bz2 samba-43e52cc177a6e2b112cd233f71a53c54bcb97265.zip |
added "pidl.pl --template" to dump a rough template to save typing
when starting a pipe. Thanks to metze for a script that gave the idea.
do something like this to use it:
pidl.pl --parse --template librpc/idl/XXX.idl > rpc_server/XXX/rpc_XXX.c
then fill in the functions in rpc_XXX.c
(This used to be commit 68e71d7497ddc7b8239fc4bd7cb3e780a1f53a39)
Diffstat (limited to 'source4/build/pidl/pidl.pl')
-rwxr-xr-x | source4/build/pidl/pidl.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index ce8250826a..9b870d7263 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -21,12 +21,14 @@ use parser; use eparser; use validator; use util; +use template; my($opt_help) = 0; my($opt_parse) = 0; my($opt_dump) = 0; my($opt_diff) = 0; my($opt_header) = 0; +my($opt_template) = 0; my($opt_server) = 0; my($opt_parser) = 0; my($opt_eparser) = 0; @@ -64,6 +66,7 @@ sub ShowHelp() --header create a C header file --parser create a C parser --server create server boilterplate + --template print a template for a pipe --eparser create an ethereal parser --diff run diff on the idl and dumped output --keep keep the .pidl file @@ -79,6 +82,7 @@ GetOptions ( 'dump' => \$opt_dump, 'header' => \$opt_header, 'server' => \$opt_server, + 'template' => \$opt_template, 'parser' => \$opt_parser, 'eparser' => \$opt_eparser, 'diff' => \$opt_diff, @@ -149,6 +153,10 @@ sub process_file($) system("diff -wu $idl_file $tempfile"); unlink($tempfile); } + + if ($opt_template) { + print IdlTemplate::Parse($pidl); + } } |