X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=tools%2Fautodoc.py;fp=tools%2Fautodoc.py;h=e95f563a5bf2737e08026f2ae739efc69c9c9c34;hp=0000000000000000000000000000000000000000;hb=0400a5a6479398d82526785c18c0df8bc8b92dce;hpb=d17e10da972ce5776c60b4c317267c6abe0e1ead
diff --git a/tools/autodoc.py b/tools/autodoc.py
new file mode 100644
index 0000000..e95f563
--- /dev/null
+++ b/tools/autodoc.py
@@ -0,0 +1,70 @@
+#
+# Structure AutoDocumentator for ircu.
+# 26/02/2000 --Gte
+#
+# Creates a 'structs.html', containing HTML Table definitions
+# for all structures encountered in *.h in the current directory.
+#
+# $Id: autodoc.py,v 1.1 2000-03-18 05:20:30 bleep Exp $
+
+import string, fnmatch, os
+
+def parse(filename):
+ OutFile = open('structs.html', 'a')
+ OutFile.write(""+filename+"
")
+ stage = 1
+ try:
+ IncFile = open(filename, 'r')
+ line = IncFile.readline()
+
+ while line != "":
+ line = string.replace(line,"\n","") # Stript out LF's.
+ splitline = string.split(line, " ")
+ try:
+ if ((stage == 2) & (splitline[0] == "};")):
+ OutFile.write("
"+"\n") + stage = 1 + if (stage == 2): + # Begin reading member information. + declr = string.split(string.strip(line), ";", 1) + comment = string.replace(declr[1], "*", "") + comment = string.replace(comment, "/", "") + + OutFile.write("
\n") + OutFile.write("
Variable | Description |