aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2013-12-28 14:59:23 +0800
committerdinoex <dinoex@FreeBSD.org>2013-12-28 14:59:23 +0800
commit53d5d931e2fcf56d340fd769bc9e0ae139e2c716 (patch)
treeb90facdaca7f7184135f3c45b432b9f2c6e0afda
parentcd606927e3e8147710e1818b179d2b2995819e0a (diff)
downloadfreebsd-ports-gnome-53d5d931e2fcf56d340fd769bc9e0ae139e2c716.tar.gz
freebsd-ports-gnome-53d5d931e2fcf56d340fd769bc9e0ae139e2c716.tar.zst
freebsd-ports-gnome-53d5d931e2fcf56d340fd769bc9e0ae139e2c716.zip
- fix exports/imports
-rw-r--r--mail/pathalias/files/patch-addlink.c24
-rw-r--r--mail/pathalias/files/patch-addnode.c19
-rw-r--r--mail/pathalias/files/patch-config.h32
-rw-r--r--mail/pathalias/files/patch-def.h24
-rw-r--r--mail/pathalias/files/patch-domain.c23
-rw-r--r--mail/pathalias/files/patch-local.c24
-rw-r--r--mail/pathalias/files/patch-main.c18
-rw-r--r--mail/pathalias/files/patch-makedb.c2
-rw-r--r--mail/pathalias/files/patch-mapaux.c25
-rw-r--r--mail/pathalias/files/patch-mapit.c50
-rw-r--r--mail/pathalias/files/patch-mem.c18
-rw-r--r--mail/pathalias/files/patch-parse.y46
-rw-r--r--mail/pathalias/files/patch-printit.c39
13 files changed, 217 insertions, 127 deletions
diff --git a/mail/pathalias/files/patch-addlink.c b/mail/pathalias/files/patch-addlink.c
index 66820a9e9c85..45e0712693c5 100644
--- a/mail/pathalias/files/patch-addlink.c
+++ b/mail/pathalias/files/patch-addlink.c
@@ -1,6 +1,6 @@
--- addlink.c.orig 1993-03-03 22:10:01.000000000 +0100
-+++ addlink.c 2013-06-16 17:03:10.000000000 +0200
-@@ -1,39 +1,35 @@
++++ addlink.c 2013-06-16 23:45:51.000000000 +0200
+@@ -1,39 +1,32 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)addlink.c 9.7 88/06/10";
@@ -8,18 +8,16 @@
#endif /* lint */
#include "def.h"
-+#include <string.h>
/* exports */
-extern link *addlink();
-extern void deadlink(), atrace(), freelink();
-extern int tracelink(), maptrace();
-char *Netchars = "!:@%"; /* sparse, but sufficient */
-+const char *Netchars = "!:@%"; /* sparse, but sufficient */
long Lcount; /* how many edges? */
/* imports */
- extern int Tflag, Dflag;
+-extern int Tflag, Dflag;
-extern link *newlink();
-extern node *addnode();
-extern void yyerror(), die();
@@ -49,7 +47,7 @@
LTRACE(from, to, cost, netchar, netdir, "");
/*
-@@ -89,7 +85,7 @@
+@@ -89,7 +82,7 @@
void
deadlink(nleft, nright)
node *nleft, *nright;
@@ -58,7 +56,7 @@
/* DEAD host */
if (nright == 0) {
-@@ -132,7 +128,7 @@
+@@ -132,7 +125,7 @@
STATIC void
netbits(l, netchar, netdir)
@@ -67,7 +65,7 @@
char netchar, netdir;
{
l->l_flag &= ~LDIR;
-@@ -144,7 +140,7 @@
+@@ -144,7 +137,7 @@
tracelink(arg)
char *arg;
{ char *bang;
@@ -76,7 +74,7 @@
if (Tracecount >= NTRACE)
return -1;
-@@ -170,8 +166,9 @@
+@@ -170,8 +163,9 @@
ltrace(from, to, cost, netchar, netdir, message)
node *from, *to;
Cost cost;
@@ -88,7 +86,7 @@
int i;
for (i = 0; i < Tracecount; i++) {
-@@ -194,7 +191,8 @@
+@@ -194,7 +188,8 @@
ltrprint(from, to, cost, netchar, netdir, message)
node *from, *to;
Cost cost;
@@ -98,7 +96,7 @@
{ char buf[256], *bptr = buf;
strcpy(bptr, from->n_name);
-@@ -213,7 +211,7 @@
+@@ -213,7 +208,7 @@
void
atrace(n1, n2)
node *n1, *n2;
@@ -107,7 +105,7 @@
int i;
char buf[256];
-@@ -230,7 +228,7 @@
+@@ -230,7 +225,7 @@
int
maptrace(from, to)
register node *from, *to;
@@ -116,7 +114,7 @@
register int i;
for (i = 0; i < Tracecount; i++) {
-@@ -248,7 +246,7 @@
+@@ -248,7 +243,7 @@
deletelink(from, to)
node *from;
node *to;
diff --git a/mail/pathalias/files/patch-addnode.c b/mail/pathalias/files/patch-addnode.c
index 86116f064086..2615e773f268 100644
--- a/mail/pathalias/files/patch-addnode.c
+++ b/mail/pathalias/files/patch-addnode.c
@@ -1,6 +1,6 @@
--- addnode.c.orig 1993-03-03 22:10:02.000000000 +0100
-+++ addnode.c 2013-06-16 17:10:09.000000000 +0200
-@@ -1,34 +1,30 @@
++++ addnode.c 2013-06-16 23:54:57.000000000 +0200
+@@ -1,6 +1,6 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)addnode.c 9.7 91/05/23";
@@ -8,8 +8,7 @@
#endif
#include "def.h"
-+#include <string.h>
-
+@@ -8,27 +8,18 @@
#define EQ(n, s) (*(n)->n_name == *(s) && strcmp((n)->n_name, (s)) == 0)
/* exports */
@@ -22,10 +21,10 @@
-extern link *addlink();
-extern node *newnode(), **newtable();
-extern char *strsave();
- extern int Iflag, Tflag, Vflag, InetFlag;
- extern node **Table, *Home;
- extern long Ncount, Tabsize;
- extern char **Argv;
+-extern int Iflag, Tflag, Vflag, InetFlag;
+-extern node **Table, *Home;
+-extern long Ncount, Tabsize;
+-extern char **Argv;
-extern void atrace(), die(), freetable();
-extern int strcmp();
@@ -43,7 +42,7 @@
static node *Private; /* list of private nodes in current input file */
/*
* these numbers are chosen because:
-@@ -83,7 +79,7 @@
+@@ -83,7 +74,7 @@
alias(n1, n2)
node *n1, *n2;
{
@@ -52,7 +51,7 @@
if (ISADOMAIN(n1) && ISADOMAIN(n2)) {
fprintf(stderr, "%s: domain alias %s = %s is illegal\n", Argv[0], n1->n_name, n2->n_name);
-@@ -219,7 +215,7 @@
+@@ -219,7 +210,7 @@
Tabsize = Primes[++Tabindex];
if (Tabsize == 0)
die("too many hosts"); /* need more prime numbers */
diff --git a/mail/pathalias/files/patch-config.h b/mail/pathalias/files/patch-config.h
index a5f5af24fbec..4abd592e564f 100644
--- a/mail/pathalias/files/patch-config.h
+++ b/mail/pathalias/files/patch-config.h
@@ -1,5 +1,5 @@
--- config.h.orig 1993-03-03 22:10:30.000000000 +0100
-+++ config.h 2013-06-16 15:49:18.000000000 +0200
++++ config.h 2013-06-16 23:36:45.000000000 +0200
@@ -29,7 +29,7 @@
#ifdef MAIN
@@ -9,3 +9,33 @@
#endif /*lint*/
#endif /*MAIN*/
+@@ -64,6 +64,9 @@
+ #define CTYPE_H ctype
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ /*
+ * malloc/free fine tuned for pathalias.
+ *
+@@ -79,9 +82,7 @@
+ #define calloc(n, s) malloc ((n)*(s))
+ #define free(s)
+ #define cfree(s)
+-extern char *memget();
+ #else /* !MYMALLOC */
+-extern char *calloc();
+ #endif /* MYMALLOC */
+
+ #ifdef STRCHR
+@@ -105,9 +106,6 @@
+
+ #endif /*BZERO*/
+
+-extern char *malloc();
+-extern char *strcpy(), *index(), *rindex();
+-
+ #ifndef STATIC
+
+ #ifdef DEBUG
diff --git a/mail/pathalias/files/patch-def.h b/mail/pathalias/files/patch-def.h
index 3d823bbbc793..ba49ebd6d254 100644
--- a/mail/pathalias/files/patch-def.h
+++ b/mail/pathalias/files/patch-def.h
@@ -1,5 +1,5 @@
--- def.h.orig 1993-03-03 22:10:01.000000000 +0100
-+++ def.h 2013-06-16 17:11:21.000000000 +0200
++++ def.h 2013-06-17 00:07:48.000000000 +0200
@@ -2,7 +2,7 @@
#ifndef lint
@@ -63,7 +63,7 @@
node *l_from;
short l_flag;
char l_netop;
-@@ -159,3 +159,65 @@
+@@ -159,3 +159,85 @@
dom *prev;
char *name;
};
@@ -75,6 +75,7 @@
+extern int tracelink(char *arg);
+extern void deletelink(node *from, node *to);
+extern int maptrace(register node *from, register node *to);
++extern long Lcount;
+
+/* prototypes addnode.c */
+extern node *addnode(register char *name);
@@ -83,6 +84,8 @@
+extern void hashanalyze(void);
+extern void fixprivate(void);
+extern node *addhidden(register char *name);
++extern node **Table;
++extern long Tabsize;
+
+/* prototypes domain.c */
+extern int ondomlist(dom **headp, char *domain);
@@ -96,6 +99,20 @@
+
+/* prototypes main.c */
+extern void die(const char *s);
++extern const char *Cfile;
++extern char *Graphout;
++extern char *Linkout;
++extern char **Argv;
++extern node *Home;
++extern int Cflag;
++extern int Dflag;
++extern int Iflag;
++extern int Tflag;
++extern int Vflag;
++extern int Fflag;
++extern int InetFlag;
++extern int Lineno;
++extern int Argc;
+
+/* prototypes mapaux.c */
+extern long pack(long low, long high);
@@ -107,6 +124,7 @@
+
+/* prototypes mapit.c */
+void mapit(void);
++extern long Nheap, Hashpart, NumNcopy, Nlink, NumLcopy;
+
+/* prototypes mem.c */
+extern void freelink(palink *l);
@@ -121,10 +139,12 @@
+#ifdef MYMALLOC
+extern char *mymalloc(register unsigned int n);
+#endif
++extern long Ncount;
+
+/* prototypes parse.c */
+extern void yyerror(const char *s);
+extern int yyparse(void);
++extern long Tcount;
+
+/* prototypes printit.c */
+extern void printit(void);
diff --git a/mail/pathalias/files/patch-domain.c b/mail/pathalias/files/patch-domain.c
index 0de65a642f44..0d464003c8d7 100644
--- a/mail/pathalias/files/patch-domain.c
+++ b/mail/pathalias/files/patch-domain.c
@@ -1,6 +1,6 @@
--- domain.c.orig 1993-03-03 22:10:02.000000000 +0100
-+++ domain.c 2013-06-16 15:38:40.000000000 +0200
-@@ -1,9 +1,14 @@
++++ domain.c 2013-06-16 23:59:43.000000000 +0200
+@@ -1,23 +1,27 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)domain.c 9.5 92/08/25";
@@ -8,15 +8,16 @@
#endif /* lint */
#include "def.h"
-+#include <string.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
/* imports */
- extern dom *newdom();
-@@ -12,12 +17,14 @@
+-extern dom *newdom();
+-extern char *strsave();
+-extern int errno, Vflag;
++#include <errno.h>
/* exports */
@@ -31,7 +32,7 @@
isadomain(domain)
char *domain;
{
-@@ -43,6 +50,7 @@
+@@ -43,6 +47,7 @@
}
}
@@ -39,7 +40,7 @@
ondomlist(headp, domain)
dom **headp;
char *domain;
-@@ -60,6 +68,7 @@
+@@ -60,6 +65,7 @@
@@ -47,7 +48,7 @@
adddom(headp, domain)
dom **headp;
char *domain;
-@@ -73,6 +82,7 @@
+@@ -73,6 +79,7 @@
*headp = d;
}
@@ -55,7 +56,7 @@
movetofront(headp, d)
dom **headp, *d;
{ dom *head = *headp;
-@@ -91,11 +101,12 @@
+@@ -91,11 +98,12 @@
#include <sys/types.h>
#include <arpa/nameser.h>
@@ -69,7 +70,7 @@
char buf[PACKETSZ+1];
if ((n = strlen(domain)) >= PACKETSZ)
-@@ -105,7 +116,7 @@
+@@ -105,7 +113,7 @@
buf[n++] = '.';
buf[n] = 0;
}
@@ -78,7 +79,7 @@
die("impossible res_mkquery error");
errno = 0;
if ((n = res_send(q, n, a, sizeof(a))) < 0)
-@@ -117,6 +128,7 @@
+@@ -117,6 +125,7 @@
}
#else /*!RESOLVER*/
/*ARGSUSED*/
diff --git a/mail/pathalias/files/patch-local.c b/mail/pathalias/files/patch-local.c
index cc66431caef1..96f2d304e699 100644
--- a/mail/pathalias/files/patch-local.c
+++ b/mail/pathalias/files/patch-local.c
@@ -1,6 +1,6 @@
--- local.c.orig 1993-03-03 22:10:02.000000000 +0100
-+++ local.c 2013-06-16 15:45:27.000000000 +0200
-@@ -1,11 +1,9 @@
++++ local.c 2013-06-16 18:29:55.000000000 +0200
+@@ -1,15 +1,14 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)local.c 9.3 91/06/11";
@@ -14,8 +14,24 @@
#ifdef UNAME
#include <sys/utsname.h>
-@@ -29,7 +27,7 @@
- extern int gethostname();
+
++
+ char *
+ local()
+ {
+@@ -22,14 +21,17 @@
+
+ #else /* !UNAME */
+
++#ifndef GETHOSTNAME
++STATIC int gethostname(char *name, int len);
++#endif /* GETHOSTNAME */
++
+ char *
+ local()
+ {
+ static char lname[64];
+- extern int gethostname();
(void) gethostname(lname, (int) sizeof(lname));
- lname[sizeof(lname)] = 0;
diff --git a/mail/pathalias/files/patch-main.c b/mail/pathalias/files/patch-main.c
index d9e91c6c255a..eac90406d4a8 100644
--- a/mail/pathalias/files/patch-main.c
+++ b/mail/pathalias/files/patch-main.c
@@ -1,5 +1,5 @@
--- main.c.orig 1993-03-03 22:10:02.000000000 +0100
-+++ main.c 2013-06-16 17:10:48.000000000 +0200
++++ main.c 2013-06-16 23:52:03.000000000 +0200
@@ -1,6 +1,6 @@
-/* pathalias -- by steve bellovin, as told to peter honeyman */
+/*_pathalias -- by steve bellovin, as told to peter honeyman */
@@ -9,13 +9,11 @@
#endif
#ifndef VMS
-@@ -9,10 +9,13 @@
+@@ -9,10 +9,11 @@
#define MAIN XXmain
#endif
-+#include <stdlib.h>
+#include <unistd.h>
-+#include <string.h>
#include "def.h"
/* exports */
@@ -24,7 +22,7 @@
char *Graphout; /* file for dumping edges (-g option) */
char *Linkout; /* file for dumping shortest path tree */
char **Argv; /* external copy of argv (for input files) */
-@@ -26,26 +29,20 @@
+@@ -26,26 +27,17 @@
int InetFlag; /* local host is w/in scope of DNS (-I flag) */
int Lineno = 1; /* line number within current input file */
int Argc; /* external copy of argc (for input files) */
@@ -32,9 +30,9 @@
-extern int tracelink();
/* imports */
- extern char *optarg;
- extern int optind;
- extern long Lcount, Ncount;
+-extern char *optarg;
+-extern int optind;
+-extern long Lcount, Ncount;
-extern long allocation();
-extern void wasted(), mapit(), hashanalyze(), deadlink();
-extern char *local();
@@ -54,7 +52,7 @@
register int c;
int errflg = 0;
-@@ -122,14 +119,14 @@
+@@ -122,14 +114,14 @@
Argv[0], locname);
}
@@ -71,7 +69,7 @@
Ncount, Lcount, allocation());
Cfile = "[backlinks]"; /* for tracing back links */
-@@ -150,7 +147,7 @@
+@@ -150,7 +142,7 @@
void
die(s)
diff --git a/mail/pathalias/files/patch-makedb.c b/mail/pathalias/files/patch-makedb.c
index 407e7d25b2f0..6ba199dcddf9 100644
--- a/mail/pathalias/files/patch-makedb.c
+++ b/mail/pathalias/files/patch-makedb.c
@@ -1,5 +1,5 @@
--- makedb.c.orig 1993-03-03 22:10:04.000000000 +0100
-+++ makedb.c 2013-06-16 16:58:53.000000000 +0200
++++ makedb.c 2013-06-16 18:17:48.000000000 +0200
@@ -4,6 +4,7 @@
#endif /* lint */
diff --git a/mail/pathalias/files/patch-mapaux.c b/mail/pathalias/files/patch-mapaux.c
index 5faeb02c7e3b..7d92bdbb4e10 100644
--- a/mail/pathalias/files/patch-mapaux.c
+++ b/mail/pathalias/files/patch-mapaux.c
@@ -1,6 +1,6 @@
--- mapaux.c.orig 1993-03-03 22:10:03.000000000 +0100
-+++ mapaux.c 2013-06-16 17:14:02.000000000 +0200
-@@ -1,33 +1,26 @@
++++ mapaux.c 2013-06-17 00:07:15.000000000 +0200
+@@ -1,33 +1,21 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)mapaux.c 9.8 91/06/23";
@@ -8,13 +8,12 @@
#endif /* lint */
#include "def.h"
-+#include <string.h>
/* imports */
- extern long Nheap, Hashpart, Tabsize, NumNcopy, Nlink, NumLcopy;
- extern node **Table, *Home;
- extern char *Graphout, *Linkout, *Netchars, **Argv;
- extern int Vflag;
+-extern long Nheap, Hashpart, Tabsize, NumNcopy, Nlink, NumLcopy;
+-extern node **Table, *Home;
+-extern char *Graphout, *Linkout, *Netchars, **Argv;
+-extern int Vflag;
-extern void freelink(), die();
-extern long pack();
-extern link *newlink();
@@ -41,7 +40,7 @@
/*
* slide everything from Table[low] to Table[high]
-@@ -103,8 +96,8 @@
+@@ -103,8 +91,8 @@
dumpnode(from)
register node *from;
{ register node *to;
@@ -52,7 +51,7 @@
for (l = from->n_link ; l; l = l->l_next) {
to = l->l_to;
-@@ -182,7 +175,7 @@
+@@ -182,7 +170,7 @@
STATIC void
dfs(n)
register node *n;
@@ -61,7 +60,7 @@
register node *next;
n->n_flag |= INDFS;
-@@ -203,7 +196,7 @@
+@@ -203,7 +191,7 @@
void
showlinks()
@@ -70,7 +69,7 @@
register node *n;
register long i;
FILE *estream;
-@@ -223,7 +216,7 @@
+@@ -223,7 +211,7 @@
fputs(l->l_to->n_name, estream);
if (NETDIR(l) == LLEFT)
putc(NETCHAR(l), estream);
@@ -79,7 +78,7 @@
}
}
(void) fclose(estream);
-@@ -323,7 +316,7 @@
+@@ -323,7 +311,7 @@
node *
ncopy(parent, l)
register node *parent;
@@ -88,7 +87,7 @@
{ register node *n, *ncp;
#ifdef DEBUG
-@@ -359,11 +352,11 @@
+@@ -359,11 +347,11 @@
*
* why copy any links other than aliases? hmmm ...
*/
diff --git a/mail/pathalias/files/patch-mapit.c b/mail/pathalias/files/patch-mapit.c
index e9c758d1851e..1e8b5f0046e4 100644
--- a/mail/pathalias/files/patch-mapit.c
+++ b/mail/pathalias/files/patch-mapit.c
@@ -1,5 +1,5 @@
--- mapit.c.orig 1993-03-03 22:10:02.000000000 +0100
-+++ mapit.c 2013-06-16 17:13:06.000000000 +0200
++++ mapit.c 2013-06-17 00:08:03.000000000 +0200
@@ -1,6 +1,6 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
@@ -8,18 +8,18 @@
#endif
#include "def.h"
-@@ -17,43 +17,42 @@
+@@ -17,43 +17,38 @@
long Nheap; /* end of heap */
long NumNcopy, Nlink, NumLcopy;
-void mapit();
-
/* imports */
- extern long Nheap, Hashpart, Tabsize, Tcount;
- extern int Tflag, Vflag;
- extern node **Table, *Home;
- extern char *Linkout, *Graphout;
-
+-extern long Nheap, Hashpart, Tabsize, Tcount;
+-extern int Tflag, Vflag;
+-extern node **Table, *Home;
+-extern char *Linkout, *Graphout;
+-
-extern void freelink(), resetnodes(), printit(), dumpgraph();
-extern void showlinks(), die();
-extern long pack(), allocation();
@@ -27,7 +27,7 @@
-extern int maptrace(), tiebreaker();
-extern node *ncopy();
-
--
+
/* privates */
static long Heaphighwater;
-static link **Heap;
@@ -70,7 +70,7 @@
Hashpart = pack(0L, Tabsize - 1);
/* expunge penalties from -a option and make circular copy lists */
-@@ -84,7 +83,7 @@
+@@ -84,7 +79,7 @@
n->n_flag |= MAPPED;
heapchildren(n); /* add children to heap */
}
@@ -79,7 +79,7 @@
if (Nheap != 0) /* sanity check */
die("null entry in heap");
-@@ -116,7 +115,7 @@
+@@ -116,7 +111,7 @@
STATIC void
heapchildren(n)
register node *n;
@@ -88,7 +88,7 @@
register node *next;
register int mtrace;
register Cost cost;
-@@ -132,11 +131,12 @@
+@@ -132,11 +127,12 @@
if (l->l_flag & LTERMINAL)
l->l_to = next = ncopy(n, l);
@@ -102,7 +102,7 @@
if (next->n_flag & MAPPED) {
if (mtrace)
-@@ -208,12 +208,12 @@
+@@ -208,12 +204,12 @@
*/
STATIC int
skiplink(l, parent, cost, trace)
@@ -117,7 +117,7 @@
n = l->l_to;
-@@ -263,7 +263,7 @@
+@@ -263,7 +259,7 @@
STATIC Cost
costof(prev, l)
register node *prev;
@@ -126,7 +126,7 @@
{ register node *next;
register Cost cost;
-@@ -296,6 +296,9 @@
+@@ -296,6 +292,9 @@
|| (NETDIR(l) == LRIGHT && (prev->n_flag & HASLEFT)))
cost += INF; /* mixed syntax */
}
@@ -136,7 +136,7 @@
return cost;
}
-@@ -303,7 +306,7 @@
+@@ -303,7 +302,7 @@
/* binary heap implementation of priority queue */
STATIC void
insert(l)
@@ -145,7 +145,7 @@
{ register node *n;
n = l->l_to;
-@@ -336,7 +339,7 @@
+@@ -336,7 +335,7 @@
*/
STATIC void
heapup(l)
@@ -154,7 +154,7 @@
{ register long cindx, pindx; /* child, parent indices */
register Cost cost;
register node *child, *parent;
-@@ -366,10 +369,10 @@
+@@ -366,10 +365,10 @@
}
/* extract min (== Heap[1]) from heap */
@@ -168,7 +168,7 @@
if (Nheap == 0)
return 0;
-@@ -399,9 +402,9 @@
+@@ -399,9 +398,9 @@
STATIC void
heapdown(l)
@@ -180,7 +180,7 @@
node *child, *rchild, *parent;
pindx = l->l_to->n_tloc;
-@@ -450,7 +453,7 @@
+@@ -450,7 +449,7 @@
STATIC void
heapswap(i, j)
long i, j;
@@ -189,7 +189,7 @@
rheap = Heap; /* heavily used -- put in register */
temp = rheap[i];
-@@ -489,7 +492,7 @@
+@@ -489,7 +488,7 @@
*/
STATIC void
backlinks()
@@ -198,7 +198,7 @@
register node *n, *child;
node *nomap;
long i;
-@@ -539,7 +542,7 @@
+@@ -539,7 +538,7 @@
if (Vflag > 1)
fprintf(stderr, "backlink: %s <- %s\n", nomap->n_name, child->n_name);
}
@@ -207,7 +207,7 @@
}
/* find a mapped copy of n if it exists */
-@@ -562,7 +565,7 @@
+@@ -562,7 +561,7 @@
*/
STATIC void
setheapbits(l)
@@ -216,7 +216,7 @@
{ register node *n;
register node *parent;
-@@ -588,8 +591,8 @@
+@@ -588,8 +587,8 @@
STATIC void
mtracereport(from, l, excuse)
node *from;
@@ -227,7 +227,7 @@
{ node *to = l->l_to;
fprintf(stderr, "%-16s ", excuse);
-@@ -638,7 +641,7 @@
+@@ -638,7 +637,7 @@
#if 00
/* this hasn't been used for years */
for (i = 1; i < Nheap; i++) {
@@ -236,7 +236,7 @@
vprintf(stderr, "%5d %-16s", i, Heap[i]->l_to->n_name);
if ((l = Heap[i]->l_to->n_link) != 0) do {
-@@ -647,7 +650,7 @@
+@@ -647,7 +646,7 @@
vprintf(stderr, "\n");
}
for (i = Hashpart; i < Tabsize; i++) {
diff --git a/mail/pathalias/files/patch-mem.c b/mail/pathalias/files/patch-mem.c
index 94615fa30d8a..3d3d6d30ab65 100644
--- a/mail/pathalias/files/patch-mem.c
+++ b/mail/pathalias/files/patch-mem.c
@@ -1,15 +1,13 @@
--- mem.c.orig 1993-03-03 22:11:23.000000000 +0100
-+++ mem.c 2013-06-16 17:14:35.000000000 +0200
-@@ -1,38 +1,40 @@
++++ mem.c 2013-06-16 23:49:12.000000000 +0200
+@@ -1,38 +1,36 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)mem.c 9.6 92/08/25";
+static const char *sccsid = "@(#)mem.c 9.6 92/08/25";
#endif
-+#include <stdlib.h>
#include "def.h"
-+#include <string.h>
/* exports */
long Ncount;
@@ -17,8 +15,8 @@
-extern long allocation();
/* imports */
- extern char *Netchars;
- extern int Vflag;
+-extern char *Netchars;
+-extern int Vflag;
-extern void die();
-extern int strlen();
#ifdef DEBUG
@@ -54,7 +52,7 @@
nomem();
return rval;
}
-@@ -40,7 +42,7 @@
+@@ -40,7 +38,7 @@
/* caution: this destroys the contents of l_next */
void
freelink(l)
@@ -63,7 +61,7 @@
{
l->l_next = Lcache;
Lcache = l;
-@@ -69,7 +71,7 @@
+@@ -69,7 +67,7 @@
char *
strsave(s)
@@ -72,7 +70,7 @@
{ register char *r;
if ((r = malloc((unsigned) strlen(s) + 1)) == 0)
-@@ -105,8 +107,6 @@
+@@ -105,8 +103,6 @@
long size;
{
#ifdef MYMALLOC
@@ -81,7 +79,7 @@
addtoheap((char *) t, size * sizeof(node *));
#else
free((char *) t);
-@@ -163,10 +163,9 @@
+@@ -163,10 +159,9 @@
#undef calloc
/* imports */
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 @@
%%
diff --git a/mail/pathalias/files/patch-printit.c b/mail/pathalias/files/patch-printit.c
index 6d073d697060..3ab880ddfc41 100644
--- a/mail/pathalias/files/patch-printit.c
+++ b/mail/pathalias/files/patch-printit.c
@@ -1,6 +1,6 @@
--- printit.c.orig 1993-03-03 22:10:03.000000000 +0100
-+++ printit.c 2013-06-16 17:17:32.000000000 +0200
-@@ -1,9 +1,10 @@
++++ printit.c 2013-06-17 00:12:38.000000000 +0200
+@@ -1,6 +1,6 @@
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
-static char *sccsid = "@(#)printit.c 9.4 89/02/07";
@@ -8,30 +8,31 @@
#endif
#include "def.h"
-+#include <string.h>
-
- /*
- * print the routes by traversing the shortest path tree in preorder.
-@@ -11,27 +12,28 @@
+@@ -11,27 +11,27 @@
*/
/* exports */
-extern void printit();
-+extern void printit(void);
/* imports */
- extern int Cflag, Vflag, Dflag, Fflag;
- extern node *Home;
- extern char *Netchars;
+-extern int Cflag, Vflag, Dflag, Fflag;
+-extern node *Home;
+-extern char *Netchars;
-extern void die();
-extern int strlen();
/* privates */
-static link *Ancestor; /* for -f option */
+-STATIC void preorder(), setpath(), printhost(), printdomain();
+-STATIC char *hostpath();
+-STATIC int printable();
+static palink *Ancestor; /* for -f option */
- STATIC void preorder(), setpath(), printhost(), printdomain();
- STATIC char *hostpath();
- STATIC int printable();
++STATIC void preorder(register palink *l, char *ppath);
++STATIC void setpath(palink *l, register char *ppath, register char *npath);
++STATIC void printhost(register node *n, char *path, Cost cost);
++STATIC void printdomain(register node *n, char *path, Cost cost);
++STATIC char *hostpath(register char *path, register palink *l, int netchar);
++STATIC int printable(register node *n);
/* in practice, even the longest paths are < 100 bytes */
-#define PATHSIZE 512
@@ -47,7 +48,7 @@
char pbuf[PATHSIZE];
/* print home */
-@@ -57,7 +59,7 @@
+@@ -57,7 +57,7 @@
*/
STATIC void
preorder(l, ppath)
@@ -56,7 +57,7 @@
char *ppath;
{ register node *n;
node *ncp; /* circular copy list */
-@@ -105,7 +107,7 @@
+@@ -105,7 +105,7 @@
printable(n)
register node *n;
{ node *ncp;
@@ -65,7 +66,7 @@
if (n->n_flag & PRINTED)
return 0;
-@@ -156,7 +158,7 @@
+@@ -156,7 +156,7 @@
STATIC void
setpath(l, ppath, npath)
@@ -74,7 +75,7 @@
register char *ppath, *npath;
{ register node *next, *parent;
char netchar;
-@@ -192,11 +194,12 @@
+@@ -192,11 +192,12 @@
return;
}
@@ -88,7 +89,7 @@
/* remainder should be a sprintf -- foo on '%' as an operator */
for ( ; (*npath = *ppath) != 0; ppath++) {
-@@ -224,7 +227,7 @@
+@@ -224,7 +225,7 @@
STATIC char *
hostpath(path, l, netchar)
register char *path;