Rn bug patch #18 (REPOSTED)

Jonathan Biggar jonab at sdcrdcf.UUCP
Sat Nov 17 10:04:28 AEST 1984


System: rn version 4.1
Bug #: 18
Priority: MEDIUM
Subject: rn does switches before looking up baud rate
Index: init.c
Prereq: 4.1
From: pur-ee!Physics:crl  (Charles LaBrec)

Description:
	In init.c, initialize() calls sw_init() before term_init().  The
	problem is that the baud rate is picked up in term_init(), so that
	if you try to use the baud rate-dependent form of a switch, 9600
	baud is always assumed (ospeed is 0).  

Fix:	Move the call to term_init() to a place before sw_init().

	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.

*** /tmp/,RCSt1001458	Mon Oct 22 14:42:06 1984
--- /tmp/,RCSt2001458	Mon Oct 22 14:42:08 1984
***************
*** 1,4
! /* $Header: init.c,v 4.1 84/09/24 11:56:37 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.1  84/09/24  11:56:37  lwall

--- 1,4 -----
! /* $Header: init.c,v 4.1.1.2 84/10/22 14:40:14 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.1.1.2  84/10/22  14:40:14  lwall
***************
*** 1,6
  /* $Header: init.c,v 4.1 84/09/24 11:56:37 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.1  84/09/24  11:56:37  lwall
   * Real baseline.
   * 

--- 1,12 -----
  /* $Header: init.c,v 4.1.1.2 84/10/22 14:40:14 lwall Exp $
   *
   * $Log:	init.c,v $
+  * Revision 4.1.1.2  84/10/22  14:40:14  lwall
+  * Moved term_init() earlier than sw_init() so ospeed gets set for switches.
+  * 
+  * Revision 4.1.1.1  84/09/25  13:22:45  lwall
+  * Branch for sdcrdcf changes.
+  * 
   * Revision 4.1  84/09/24  11:56:37  lwall
   * Real baseline.
   * 
***************
*** 58,63
      tcbuf = safemalloc(1024);		/* make temp buffer for termcap and */
  					/* other initialization stuff */
      
      /* decode switches */
  
      sw_init(argc,argv,tcbuf);               /* must not do % interps! */

--- 64,75 -----
      tcbuf = safemalloc(1024);		/* make temp buffer for termcap and */
  					/* other initialization stuff */
      
+     /* init terminal */
+     
+     term_init(tcbuf);			/* must precede sw_init() so that */
+ 					/* ospeed is set for baud-rate */
+ 					/* switches. */
+ 
      /* decode switches */
  
      sw_init(argc,argv,tcbuf);               /* must not do % interps! */
***************
*** 78,84
  	finalize(1);
      }
  
!     /* init signals, status flags and terminal stuff */
  
      final_init();
      term_init(tcbuf);

--- 90,96 -----
  	finalize(1);
      }
  
!     /* init signals, status flags */
  
      final_init();
      
***************
*** 81,87
      /* init signals, status flags and terminal stuff */
  
      final_init();
-     term_init(tcbuf);
      
      /* get info on last rn run, if any */
  

--- 93,98 -----
      /* init signals, status flags */
  
      final_init();
      
      /* get info on last rn run, if any */
  



More information about the Comp.sources.bugs mailing list