diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-06-09 02:59:50 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-06-09 02:59:50 +0000 |
commit | eee003da6aee5ffc00e318fc0390e6b19151a675 (patch) | |
tree | 3cdb43304603d5bc38c2b2609fa8696731c898d5 /source3/aparser/header.awk | |
parent | c3487b00dd1dde7fa0511211f466acc1c05d8f3d (diff) | |
download | samba-eee003da6aee5ffc00e318fc0390e6b19151a675.tar.gz samba-eee003da6aee5ffc00e318fc0390e6b19151a675.tar.xz samba-eee003da6aee5ffc00e318fc0390e6b19151a675.zip |
started adding support for relative, plus options for autoalignment
so the same parser generator can be uses for cifs and rpc
(This used to be commit c7829fa0d87081d9b3f33468527583e3b763916b)
Diffstat (limited to 'source3/aparser/header.awk')
-rw-r--r-- | source3/aparser/header.awk | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/aparser/header.awk b/source3/aparser/header.awk index 900985b84b..ba7117436b 100644 --- a/source3/aparser/header.awk +++ b/source3/aparser/header.awk @@ -7,7 +7,7 @@ function header_elstring(elnum, elem=elements[elnum, "elem"]; if (elements[elnum, "ptr"]=="1") elem="*"elem; if (array_len!="") { - if (match(array_len,"[0-9]") == 1) { + if (is_constant(array_len) == 1) { elem=elem"["array_len"]"; } else { elem="*"elem; @@ -63,6 +63,14 @@ function produce_headers(f, NIL, xprintf(f,"/* auto-generated headers for %s */\n\n\n", module); xprintf(f,"#ifndef _%s_\n", module); xprintf(f,"#define _%s_\n", module); + + xprintf(f,"\n\n"); + for (i=0;i < num_options;i++) { + xprintf(f,"#define OPTION_%s %s\n", + options[i, "name"], options[i, "value"]); + } + xprintf(f,"\n\n"); + for (i=0;i < num_structs;i++) { header_struct(f, i); } |