summaryrefslogtreecommitdiff
path: root/doc/specs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/specs')
-rw-r--r--doc/specs/.cvsignore2
-rw-r--r--doc/specs/Makefile.am23
-rw-r--r--doc/specs/formatter/Makefile16
-rw-r--r--doc/specs/parse.lex (renamed from doc/specs/formatter/parse.lex)0
-rw-r--r--doc/specs/parse.y (renamed from doc/specs/formatter/parse.y)9
5 files changed, 30 insertions, 20 deletions
diff --git a/doc/specs/.cvsignore b/doc/specs/.cvsignore
index bac7934f..33cd58dc 100644
--- a/doc/specs/.cvsignore
+++ b/doc/specs/.cvsignore
@@ -1,3 +1,5 @@
draft-morgan-pam-*.txt
Makefile
Makefile.in
+parse.c
+lex.yy.c
diff --git a/doc/specs/Makefile.am b/doc/specs/Makefile.am
new file mode 100644
index 00000000..749f0ba7
--- /dev/null
+++ b/doc/specs/Makefile.am
@@ -0,0 +1,23 @@
+#
+# Copyright (c) 2005 Thorsten Kukuk <kukuk@suse.de>
+#
+
+CLEANFILES = draft-morgan-pam-current.txt *~
+
+EXTRA_DIST = draft-morgan-pam.raw std-agent-id.raw rfc86.0.txt lex.yy.c
+
+all: padout spec
+
+spec: draft-morgan-pam.raw
+ ./padout < draft-morgan-pam.raw > draft-morgan-pam-current.txt
+
+noinst_PROGRAMS = padout
+
+padout_SOURCES = parse.y parse.lex
+
+padout_LDADD = @LEXLIB@
+
+parse.c: lex.yy.c
+
+lex.yy.c: parse.lex
+ $(LEX) parse.lex
diff --git a/doc/specs/formatter/Makefile b/doc/specs/formatter/Makefile
deleted file mode 100644
index d73258d7..00000000
--- a/doc/specs/formatter/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-LIBS=-lfl
-
-padout: parse.tab.o
- $(CC) -o padout parse.tab.o $(LIBS)
-
-parse.tab.o: parse.tab.c lex.yy.c
- $(CC) -c parse.tab.c
-
-parse.tab.c: parse.y
- bison parse.y
-
-lex.yy.c: parse.lex
- flex parse.lex
-
-clean:
- rm -f parse.tab.o parse.tab.c lex.yy.c padout *~ core
diff --git a/doc/specs/formatter/parse.lex b/doc/specs/parse.lex
index 1d5c898e..1d5c898e 100644
--- a/doc/specs/formatter/parse.lex
+++ b/doc/specs/parse.lex
diff --git a/doc/specs/formatter/parse.y b/doc/specs/parse.y
index 6da47d17..9d0e2534 100644
--- a/doc/specs/formatter/parse.y
+++ b/doc/specs/parse.y
@@ -170,7 +170,7 @@ typedef struct node_s {
node_t label_root = NULL;
node_t counter_root = NULL;
-const char *find_key(node_t root, const char *key)
+static const char *find_key(node_t root, const char *key)
{
while (root) {
int cmp = strcmp(key, root->key);
@@ -186,7 +186,7 @@ const char *find_key(node_t root, const char *key)
return NULL;
}
-node_t set_key(node_t root, const char *key, const char *value)
+static node_t set_key(node_t root, const char *key, const char *value)
{
if (root) {
int cmp = strcmp(key, root->key);
@@ -287,7 +287,8 @@ char *new_counter(const char *key)
return new;
}
-main()
+int
+main(void)
{
- yyparse();
+ return yyparse();
}