honey@citi.umich.edu (Peter Honeyman) (06/02/91)
smail exercises a feature that trips over a bug. here's the fix.
peter
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** parse.y.old Sun Jun 2 00:00:29 1991
--- parse.y Sat Jun 1 23:55:50 1991
***************
*** 1,7 ****
%{
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
! static char *sccsid = "@(#)parse.y 9.10 88/09/07";
#endif /* lint */
#include "def.h"
--- 1,7 ----
%{
/* pathalias -- by steve bellovin, as told to peter honeyman */
#ifndef lint
! static char *sccsid = "@(#)parse.y 9.11 91/06/01";
#endif /* lint */
#include "def.h"
***************
*** 25,30 ****
--- 25,31 ----
extern int optind;
extern char *Cfile, *Netchars, **Argv;
extern int Lineno, Argc;
+ extern node *Home;
/* privates */
STATIC void fixnet(), adjust();
***************
*** 195,200 ****
--- 196,204 ----
n = addnode($1);
deletelink(n, (node *) 0);
n->n_flag |= ISPRIVATE;
+ /* reset Home if it's deleted */
+ if (n == Home)
+ Home = addnode(Home->n_name);
}
| usite NET usite {deletelink($1, $3);}
;