[comp.sys.hp] rn and rrn

sukmi@cs.psu.edu (Sukmi Lim) (02/09/90)

Could anyone tell me the difference between rn and rrn?
I am in the middle of compiling rn on HP9000 series 300 running on HP-UX 6.5,
and rn runs in cbreak mode.  It says it means you dont have to type carriage 
return on single character commands.  
HP-UX didnt define CBREAK in ioctl.h, so I looked at BSD Unix machine and 
defined CBREAK as it was on sun.  I compiled the whole thing and was ready 
to run rn.
When I ran rn, it gave me the message starting with "Welcome to rn....
...., just once for each person."
And on the bottom of the screen, it say "[Type space to continue]".
I typed the space key several times, but it seems that it got stuck there.
When I typed the carriage return, it says "Can't open"
It didnt say 'what' it can't open.  So I wondered if it was something to do
with defining CBREAK.

I am sure there are people who installed rn/rrn on HP-UX machine.  Could anyone
tell me what are the things that I have to keep in mind when installing rn/rrn?

Thanks in advance.

Please reply to:
  sukmi@psuvax1.cs.psu.edu
  sukmi@terra.geosc.psu.edu

tml@hemuli.tik.vtt.fi (Tor Lillqvist) (02/14/90)

In article <Ci$9ku2@cs.psu.edu> sukmi@cs.psu.edu (Sukmi Lim) writes:
>Could anyone tell me the difference between rn and rrn?

rn reads news from the local machine, rrn uses the NNTP protocol to a
remote news server machine.

>I am in the middle of compiling rn on HP9000 series 300 running on HP-UX 6.5,
>and rn runs in cbreak mode.  It says it means you dont have to type carriage 
>return on single character commands.  
>HP-UX didnt define CBREAK in ioctl.h, so I looked at BSD Unix machine and 
>defined CBREAK as it was on sun.  I compiled the whole thing and was ready 
>to run rn.

This is the wrong thing to do.  Rn uses the termio(7) style ioctls
just fine.  The only catch is that the latest patchlevel of rn (pl 44,
which I assume you are using) has a bug in the Configure script, where
it tries to figure out whether to use termio ioctls or stty/gtty.
Apply the patch below.

(The bug (IMHO) is in the use of test at line 1284. "test something"
doesn't run "something" and check its exit status, it checks that
"something" is a nonempty string...)

*** orig/Configure	Tue Dec 19 18:49:28 1989
--- Configure	Tue Dec 19 19:38:35 1989
***************
*** 477,482 ****
--- 477,501 ----
      fi
  fi
  
+ : check for hp-ux
+ cat <<'EOT' >hp-ux.c
+ #ifdef hpux
+ exit 0
+ #else
+ exit 1
+ #endif
+ EOT
+ $cpp hp-ux.c | grep exit >hp-ux
+ chmod 755 hp-ux
+ rm hp-ux.c
+ if hp-ux; then
+     echo "Running hp-ux, eh?"
+     if grep 'void[ 	]*(\*signal' /usr/include/sys/signal.h >/dev/null; then
+ 	echo "And you seem to be running a recent version."
+ 	voidsig=define
+     fi
+ fi
+ 
  : see if sh knows # comments
  echo " "
  echo "Checking your sh to see if it knows about # comments..."
***************
*** 1281,1287 ****
  fi
  
  : see if this is a termio system
! if $test -r /usr/include/termio.h -a  ! ultrix -a ! sun ; then
      termio=define
      $echo "termio.h found."
  else
--- 1300,1306 ----
  fi
  
  : see if this is a termio system
! if $test -r /usr/include/termio.h -a "`cat ultrix`" = 'exit 1' -a "`cat sun`" = 'exit 1' ; then
      termio=define
      $echo "termio.h found."
  else
-- 
Tor Lillqvist,
working, but not speaking, for the Technical Research Centre of Finland