summaryrefslogtreecommitdiffstats
path: root/src/util/ss/ct_c.awk
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-06-28 18:28:11 +0000
committerTheodore Tso <tytso@mit.edu>1995-06-28 18:28:11 +0000
commit966b47e499faefe16dc615ac4df920f95131db6d (patch)
tree7abe8dfdf5d2406d4a07e24266fe425ed022aadc /src/util/ss/ct_c.awk
parentf33c01c4c2c38f1c3ec1e1418ea6e158a6b50b16 (diff)
Rename ct_c.* to ct_c.*.in. ct_c.sed.in is now processed by sed to
remove comment lines beginning with '#', since some sed programs can't handle that. Change config_script so that the directory where the ct_c.* files can be specified, since those are in the build directory, instead of the source directory. (This is all for the sake of System V sed. Sigh.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6186 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/ss/ct_c.awk')
-rw-r--r--src/util/ss/ct_c.awk77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/util/ss/ct_c.awk b/src/util/ss/ct_c.awk
deleted file mode 100644
index 872f6e007..000000000
--- a/src/util/ss/ct_c.awk
+++ /dev/null
@@ -1,77 +0,0 @@
-/^command_table / {
- cmdtbl = $2;
- printf "/* %s.c - automatically generated from %s.ct */\n", \
- rootname, rootname > outfile
- print "#include <ss/ss.h>" > outfile
- print "" >outfile
- print "#ifndef __STDC__" > outfile
- print "#define const" > outfile
- print "#endif" > outfile
- print "" > outfile
-}
-
-/^BOR$/ {
- cmdnum++
- options = 0
- cmdtab = ""
- printf "static char const * const ssu%05d[] = {\n", cmdnum > outfile
-}
-
-/^sub/ {
- subr = substr($0, 6, length($0)-5)
-}
-
-/^hlp/ {
- help = substr($0, 6, length($0)-5)
-}
-
-/^cmd/ {
- cmd = substr($0, 6, length($0)-5)
- printf "%s\"%s\",\n", cmdtab, cmd > outfile
- cmdtab = " "
-}
-
-/^opt/ {
- opt = substr($0, 6, length($0)-5)
- if (opt == "dont_list") {
- options += 1
- }
- if (opt == "dont_summarize") {
- options += 2
- }
-}
-
-/^EOR/ {
- print " (char const *)0" > outfile
- print "};" > outfile
- printf "extern void %s __SS_PROTO;\n", subr > outfile
- subr_tab[cmdnum] = subr
- options_tab[cmdnum] = options
- help_tab[cmdnum] = help
-}
-
-/^[0-9]/ {
- linenum = $1;
-}
-
-/^ERROR/ {
- error = substr($0, 8, length($0)-7)
- printf "Error in line %d: %s\n", linenum, error
- print "#__ERROR_IN_FILE__" > outfile
-}
-
-END {
- printf "static ss_request_entry ssu%05d[] = {\n", cmdnum+1 > outfile
- for (i=1; i <= cmdnum; i++) {
- printf " { ssu%05d,\n", i > outfile
- printf " %s,\n", subr_tab[i] > outfile
- printf " \"%s\",\n", help_tab[i] > outfile
- printf " %d },\n", options_tab[i] > outfile
- }
- print " { 0, 0, 0, 0 }" > outfile
- print "};" > outfile
- print "" > outfile
- printf "ss_request_table %s = { 2, ssu%05d };\n", \
- cmdtbl, cmdnum+1 > outfile
-}
-