[net.sources.bugs] rn 4.3 patch #9

lwall@sdcrdcf.UUCP (Larry Wall) (05/16/85)

System: rn version 4.3
Patch #: 9
Priority: LOW
Subject: some random typos and stuff
From: ekrell@ucla-cs.UUCP (Eduardo Krell), dsp@ptsfa.UUCP (David St. Pierre)

Description:
	"gecos" was misspelled in intrp.c

	intrp.h was included twice in respond.c

	execl() in util.c was 0 terminated instead of Nullch terminated.

	ndir.c used short where it should use ino_t.

Fix:	From rn, say "| patch -d DIR", where DIR is your rn source directory.
	Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
	the patch program, apply the following by hand, or get patch.

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

Index: patchlevel
Prereq: 8
1c1
< Patch #: 8
---
> Patch #: 9

Index: intrp.c
Prereq: 4.3
*** intrp.c.old	Wed May 15 14:47:52 1985
--- intrp.c	Wed May 15 14:48:07 1985
***************
*** 1,4
! /* $Header: intrp.c,v 4.3 85/05/01 11:40:54 lwall Exp $
   *
   * $Log:	intrp.c,v $
   * Revision 4.3  85/05/01  11:40:54  lwall

--- 1,4 -----
! /* $Header: intrp.c,v 4.3.1.2 85/05/15 14:39:45 lwall Exp $
   *
   * $Log:	intrp.c,v $
   * Revision 4.3.1.2  85/05/15  14:39:45  lwall
***************
*** 1,6
  /* $Header: intrp.c,v 4.3 85/05/01 11:40:54 lwall Exp $
   *
   * $Log:	intrp.c,v $
   * Revision 4.3  85/05/01  11:40:54  lwall
   * Baseline for release with 4.3bsd.
   * 

--- 1,12 -----
  /* $Header: intrp.c,v 4.3.1.2 85/05/15 14:39:45 lwall Exp $
   *
   * $Log:	intrp.c,v $
+  * Revision 4.3.1.2  85/05/15  14:39:45  lwall
+  * Spelled gecos right.
+  * 
+  * Revision 4.3.1.1  85/05/10  11:33:51  lwall
+  * Branch for patches.
+  * 
   * Revision 4.3  85/05/01  11:40:54  lwall
   * Baseline for release with 4.3bsd.
   * 
***************
*** 990,996
  #ifdef GETPWENT
      struct passwd *pwd = getpwuid(uid);
      
!     s = pwd->pw_gcos;
  #else
      char tmpbuf[512];
      int i;

--- 996,1002 -----
  #ifdef GETPWENT
      struct passwd *pwd = getpwuid(uid);
      
!     s = pwd->pw_gecos;
  #else
      char tmpbuf[512];
      int i;

Index: ndir.c
Prereq: 4.3
*** ndir.c.old	Wed May 15 14:50:24 1985
--- ndir.c	Wed May 15 14:50:26 1985
***************
*** 1,4
! /* $Header: ndir.c,v 4.3 85/05/01 11:42:55 lwall Exp $
   *
   * $Log:	ndir.c,v $
   * Revision 4.3  85/05/01  11:42:55  lwall

--- 1,4 -----
! /* $Header: ndir.c,v 4.3.1.2 85/05/15 14:46:00 lwall Exp $
   *
   * $Log:	ndir.c,v $
   * Revision 4.3.1.2  85/05/15  14:46:00  lwall
***************
*** 1,6
  /* $Header: ndir.c,v 4.3 85/05/01 11:42:55 lwall Exp $
   *
   * $Log:	ndir.c,v $
   * Revision 4.3  85/05/01  11:42:55  lwall
   * Baseline for release with 4.3bsd.
   * 

--- 1,12 -----
  /* $Header: ndir.c,v 4.3.1.2 85/05/15 14:46:00 lwall Exp $
   *
   * $Log:	ndir.c,v $
+  * Revision 4.3.1.2  85/05/15  14:46:00  lwall
+  * Changed short to ino_t, which may be ushort on some systems.
+  * 
+  * Revision 4.3.1.1  85/05/10  11:35:34  lwall
+  * Branch for patches.
+  * 
   * Revision 4.3  85/05/01  11:42:55  lwall
   * Baseline for release with 4.3bsd.
   * 
***************
*** 12,17
  #include "ndir.h"
  
  #ifdef USENDIR
  /*
   * support for Berkeley directory reading routine on a V7 file system
   */

--- 18,24 -----
  #include "ndir.h"
  
  #ifdef USENDIR
+ #include <sys/types.h>
  /*
   * support for Berkeley directory reading routine on a V7 file system
   */
***************
*** 44,50
  #define	ODIRSIZ	14
  
  struct	olddirect {
! 	short	od_ino;
  	char	od_name[ODIRSIZ];
  };
  #else	an Pyramid in the ATT universe

--- 51,57 -----
  #define	ODIRSIZ	14
  
  struct	olddirect {
! 	ino_t	od_ino;
  	char	od_name[ODIRSIZ];
  };
  #else	an Pyramid in the ATT universe

Index: respond.c
Prereq: 4.3.1.2
*** respond.c.old	Wed May 15 14:49:17 1985
--- respond.c	Wed May 15 14:49:31 1985
***************
*** 1,4
! /* $Header: respond.c,v 4.3.1.2 85/05/14 08:55:15 lwall Exp $
   *
   * $Log:	respond.c,v $
   * Revision 4.3.1.2  85/05/14  08:55:15  lwall

--- 1,4 -----
! /* $Header: respond.c,v 4.3.1.3 85/05/15 14:42:32 lwall Exp $
   *
   * $Log:	respond.c,v $
   * Revision 4.3.1.3  85/05/15  14:42:32  lwall
***************
*** 1,6
  /* $Header: respond.c,v 4.3.1.2 85/05/14 08:55:15 lwall Exp $
   *
   * $Log:	respond.c,v $
   * Revision 4.3.1.2  85/05/14  08:55:15  lwall
   * Default for normal/mailbox question was applied to wrong buffer.
   * 

--- 1,9 -----
  /* $Header: respond.c,v 4.3.1.3 85/05/15 14:42:32 lwall Exp $
   *
   * $Log:	respond.c,v $
+  * Revision 4.3.1.3  85/05/15  14:42:32  lwall
+  * Removed duplicate include of intrp.h.
+  * 
   * Revision 4.3.1.2  85/05/14  08:55:15  lwall
   * Default for normal/mailbox question was applied to wrong buffer.
   * 
***************
*** 20,26
  #include "ng.h"
  #include "util.h"
  #include "rn.h"
- #include "intrp.h"
  #include "artio.h"
  #include "final.h"
  #include "INTERN.h"

--- 23,28 -----
  #include "ng.h"
  #include "util.h"
  #include "rn.h"
  #include "artio.h"
  #include "final.h"
  #include "INTERN.h"

Index: util.c
Prereq: 4.3
*** util.c.old	Wed May 15 14:49:49 1985
--- util.c	Wed May 15 14:49:53 1985
***************
*** 1,4
! /* $Header: util.c,v 4.3 85/05/01 11:51:44 lwall Exp $
   *
   * $Log:	util.c,v $
   * Revision 4.3  85/05/01  11:51:44  lwall

--- 1,4 -----
! /* $Header: util.c,v 4.3.1.2 85/05/15 14:44:27 lwall Exp $
   *
   * $Log:	util.c,v $
   * Revision 4.3.1.2  85/05/15  14:44:27  lwall
***************
*** 1,6
  /* $Header: util.c,v 4.3 85/05/01 11:51:44 lwall Exp $
   *
   * $Log:	util.c,v $
   * Revision 4.3  85/05/01  11:51:44  lwall
   * Baseline for release with 4.3bsd.
   * 

--- 1,12 -----
  /* $Header: util.c,v 4.3.1.2 85/05/15 14:44:27 lwall Exp $
   *
   * $Log:	util.c,v $
+  * Revision 4.3.1.2  85/05/15  14:44:27  lwall
+  * Last arg of execl changed from 0 to Nullch [(char*)0].
+  * 
+  * Revision 4.3.1.1  85/05/10  11:41:30  lwall
+  * Branch for patches.
+  * 
   * Revision 4.3  85/05/01  11:51:44  lwall
   * Baseline for release with 4.3bsd.
   * 
***************
*** 40,46
  	shell = PREFSHELL;
      if ((pid = vfork()) == 0) {
  	if (*s)
! 	    execl(shell, shell, "-c", s, 0);
  	else
  	    execl(shell, shell, Nullch, Nullch, 0);
  	_exit(127);

--- 46,52 -----
  	shell = PREFSHELL;
      if ((pid = vfork()) == 0) {
  	if (*s)
! 	    execl(shell, shell, "-c", s, Nullch);
  	else
  	    execl(shell, shell, Nullch, Nullch, Nullch);
  	_exit(127);
***************
*** 42,48
  	if (*s)
  	    execl(shell, shell, "-c", s, 0);
  	else
! 	    execl(shell, shell, Nullch, Nullch, 0);
  	_exit(127);
      }
  #ifndef lint

--- 48,54 -----
  	if (*s)
  	    execl(shell, shell, "-c", s, Nullch);
  	else
! 	    execl(shell, shell, Nullch, Nullch, Nullch);
  	_exit(127);
      }
  #ifndef lint