diff options
author | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-04-24 07:20:22 -0400 |
---|---|---|
committer | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-04-24 07:20:22 -0400 |
commit | 8f27e65bddd7d4b8515ce620fb485fdd78fcdf89 (patch) | |
tree | bd328a4dd4f92d32202241b5e3a7f36177792c5f /clientcomm/rpcif.h.awk_dec2 | |
download | rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.gz rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.xz rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.zip |
Initial commitv8.0
Diffstat (limited to 'clientcomm/rpcif.h.awk_dec2')
-rw-r--r-- | clientcomm/rpcif.h.awk_dec2 | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/clientcomm/rpcif.h.awk_dec2 b/clientcomm/rpcif.h.awk_dec2 new file mode 100644 index 0000000..d71df53 --- /dev/null +++ b/clientcomm/rpcif.h.awk_dec2 @@ -0,0 +1,46 @@ +BEGIN { + print "#ifndef _RPCIF_H_RPCGEN"; + print "#define _RPCIF_H_RPCGEN"; + print "#include <rpc/rpc.h>"; + } +/\*rpc[^(]*/ { + if (FILENAME == "rpcif.h.tmp") + { + headerLine = $0; + startMethodName = index(headerLine, "*") + 1; + methodNameLength = length(headerLine) - 2 - startMethodName; + methodName = substr(headerLine, startMethodName, methodNameLength); + #print "method name " methodName; + startOfLine = substr(headerLine, 1, startMethodName - 1); + #print "start of line " startOfLine; + #print "method name to replace " methodNameToReplace; + startInMethod = index(theMethods, methodName); + methodIsFirst = substr(theMethods, startInMethod); + #print "methodIsFirst " methodIsFirst; + endInMethod = index(methodIsFirst, ":"); + endInMethod--; + methodIsOnly = substr(methodIsFirst, 1, endInMethod); + #print "methodIsOnly " methodIsOnly; + correctLine = startOfLine methodIsOnly ";"; + print correctLine; + next; + } + } +/^rpc[^(]*/ { + if (FILENAME != "rpcif.h.tmp") + { + theMethods = $0 ":" theMethods; + #print "theMethods " theMethods; + } + next; + } + { + if (FILENAME == "rpcif.h.tmp") + { + print $0; + } + } + +END { + print "#endif" + }
\ No newline at end of file |