summaryrefslogtreecommitdiff
path: root/mail/pathalias/files/patch-parse.y
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2013-12-28 06:59:23 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2013-12-28 06:59:23 +0000
commit5f37cdd9cb558ada47421dc40c35cb11422862b7 (patch)
treeb90facdaca7f7184135f3c45b432b9f2c6e0afda /mail/pathalias/files/patch-parse.y
parent- apply gawk patch in any case (diff)
- fix exports/imports
Notes
Notes: svn path=/head/; revision=337841
Diffstat (limited to 'mail/pathalias/files/patch-parse.y')
-rw-r--r--mail/pathalias/files/patch-parse.y46
1 files changed, 38 insertions, 8 deletions
diff --git a/mail/pathalias/files/patch-parse.y b/mail/pathalias/files/patch-parse.y
index 60834bf97a98..25fdc316f389 100644
--- a/mail/pathalias/files/patch-parse.y
+++ b/mail/pathalias/files/patch-parse.y
@@ -1,6 +1,6 @@
--- parse.y.orig 1993-03-03 22:10:03.000000000 +0100
-+++ parse.y 2013-06-16 17:16:43.000000000 +0200
-@@ -1,10 +1,11 @@
++++ parse.y 2013-06-17 00:03:43.000000000 +0200
+@@ -1,9 +1,10 @@
%{
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
@@ -8,12 +8,11 @@
+static const char *sccsid = "@(#)parse.y 9.11 91/06/01";
#endif /* lint */
++#include <unistd.h>
#include "def.h"
-+#include <string.h>
/* scanner states (yylex, parse) */
- #define OTHER 0
-@@ -14,14 +15,8 @@
+@@ -14,22 +15,16 @@
/* exports */
long Tcount;
@@ -25,9 +24,23 @@
-extern link *addlink();
-extern int strcmp();
-extern char *strsave();
- extern int optind;
- extern char *Cfile, *Netchars, **Argv;
- extern int Lineno, Argc;
+-extern int optind;
+-extern char *Cfile, *Netchars, **Argv;
+-extern int Lineno, Argc;
+-extern node *Home;
+
+ /* privates */
+-STATIC void fixnet(), adjust();
+-STATIC int yylex(), yywrap(), getword();
++STATIC void fixnet(register node *network, node *nlist, Cost cost, int netchar, int netdir);
++STATIC void adjust(node *n, Cost cost);
++STATIC int yylex(void);
++STATIC int yywrap(void);
++STATIC int getword(register char *str, register int c);
++static const char *Netchars = "!:@%"; /* sparse, but sufficient */
+ static int Scanstate = NEWLINE; /* scanner (yylex) state */
+
+ /* flags for ys_flags */
@@ -78,7 +73,7 @@
;
@@ -46,6 +59,23 @@
l = addlink($1, $3.ys_node, $4, $3.ys_net, $3.ys_dir);
if (GATEWAYED($3.ys_node))
+@@ -99,11 +94,11 @@
+ ;
+
+ host : HOST {$$ = addnode($1);}
+- | PRIVATE {$$ = addnode("private");}
+- | DEAD {$$ = addnode("dead");}
+- | DELETE {$$ = addnode("delete");}
+- | FILETOK {$$ = addnode("file");}
+- | ADJUST {$$ = addnode("adjust");}
++ | PRIVATE {$$ = addnode(strsave("private"));}
++ | DEAD {$$ = addnode(strsave("dead"));}
++ | DELETE {$$ = addnode(strsave("delete"));}
++ | FILETOK {$$ = addnode(strsave("file"));}
++ | ADJUST {$$ = addnode(strsave("adjust"));}
+ ;
+
+ site : asite {
@@ -238,18 +233,18 @@
%%