From 128026c9a2de83a8ac6214e733fa871440c6b77f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 May 2000 12:43:53 +0000 Subject: added the ".trailer" type, to mark where a packet turns into a trailer this now gives us enough to parse complete function calls, including the return values (This used to be commit ca8f1e92adf3603ad15f73277576cc9178bb4d74) --- source3/aparser/Makefile | 2 +- source3/aparser/header.awk | 1 + source3/aparser/parsefn.awk | 16 +++++++-- source3/aparser/spool.struct | 80 ++++++++++++++++++++++++------------------- source3/aparser/srvsvc.struct | 53 ++++++++++++++++++---------- source3/aparser/vluke.c | 3 +- 6 files changed, 97 insertions(+), 58 deletions(-) (limited to 'source3/aparser') diff --git a/source3/aparser/Makefile b/source3/aparser/Makefile index 160b11155a..ebf3a9bcde 100644 --- a/source3/aparser/Makefile +++ b/source3/aparser/Makefile @@ -7,7 +7,7 @@ AWKPROGS=dump.awk harness.awk header.awk parsefn.awk main.awk parsetree.awk temp all: test.h vluke test.h : $(AWKPROGS) - igawk -f main.awk spool.struct + igawk -f main.awk srvsvc.struct vluke: test.h $(OBJ) $(CC) $(CFLAGS) -o vluke $(OBJ) diff --git a/source3/aparser/header.awk b/source3/aparser/header.awk index 406335c930..24232bacf0 100644 --- a/source3/aparser/header.awk +++ b/source3/aparser/header.awk @@ -13,6 +13,7 @@ function header_element(f, elnum, LOCAL, type) { type=elements[elnum, "type"]; + if (substr(type,1,1) == ".") return; xprintf(f,"\t%s %s;\n", type, header_elstring(elnum)); } diff --git a/source3/aparser/parsefn.awk b/source3/aparser/parsefn.awk index 68f08618a6..3f1e3e8093 100644 --- a/source3/aparser/parsefn.awk +++ b/source3/aparser/parsefn.awk @@ -27,6 +27,7 @@ function parse_element(f, v, elnum, flags, LOCAL, type, elem) { type = elements[elnum, "type"]; + if (substr(type,1,1) == ".") return; elem = elements[elnum, "elem"]; if (elements[elnum,"ptr"] == "") { v["PTR"] = "\\&"; @@ -117,24 +118,33 @@ function parse_buffers(f, v, elnum, flags, } function struct_parser(f, v, struct_num, - LOCAL, i) + LOCAL, i, n1) { v["STRUCTNAME"] = structs[struct_num, "name"]; v["FUNCNAME"] = "io_" v["STRUCTNAME"]; print_template(f, "fn_start.tpl", v); + for (n1=0;n1