home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / pathalias10.pch < prev    next >
Encoding:
Text File  |  1991-12-20  |  1.5 KB  |  60 lines

  1. Newsgroups: comp.sources.unix
  2. From: honey@citi.umich.edu (Peter Honeyman)
  3. Subject: v25i089: patch to pathalias V10 from Volume 22
  4. Sender: sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: honey@citi.umich.edu (Peter Honeyman)
  8. Posting-Number: Volume 25, Issue 89
  9. Archive-Name: pathalias10.pch
  10.  
  11. [ this was originally posted in comp.mail.uucp on 2-June-1991.  i'm posting
  12.   it here because it's a patch to the pathalias10 in Volume 22. --vix ]
  13.  
  14. smail exercises a feature that trips over a bug.  here's the fix.
  15.  
  16.     peter
  17.  
  18. *** parse.y.old    Sun Jun  2 00:00:29 1991
  19. --- parse.y    Sat Jun  1 23:55:50 1991
  20. ***************
  21. *** 1,7 ****
  22.   %{
  23.   /* pathalias -- by steve bellovin, as told to peter honeyman */
  24.   #ifndef lint
  25. ! static char    *sccsid = "@(#)parse.y    9.10 88/09/07";
  26.   #endif /* lint */
  27.   
  28.   #include "def.h"
  29. --- 1,7 ----
  30.   %{
  31.   /* pathalias -- by steve bellovin, as told to peter honeyman */
  32.   #ifndef lint
  33. ! static char    *sccsid = "@(#)parse.y    9.11 91/06/01";
  34.   #endif /* lint */
  35.   
  36.   #include "def.h"
  37. ***************
  38. *** 25,30 ****
  39. --- 25,31 ----
  40.   extern int optind;
  41.   extern char *Cfile, *Netchars, **Argv;
  42.   extern int Lineno, Argc;
  43. + extern node *Home;
  44.   
  45.   /* privates */
  46.   STATIC void fixnet(), adjust();
  47. ***************
  48. *** 195,200 ****
  49. --- 196,204 ----
  50.           n = addnode($1);
  51.           deletelink(n, (node *) 0);
  52.           n->n_flag |= ISPRIVATE;
  53. +         /* reset Home if it's deleted */
  54. +         if (n == Home)
  55. +             Home = addnode(Home->n_name);
  56.         }
  57.       | usite NET usite    {deletelink($1, $3);}
  58.       ;
  59.  
  60.