[news.software.nn] Does anyone have nn running on IBM RS/6000?

knodel@news.colorado.edu (KNODEL DAVID) (12/20/90)

If anyone has nn running on an IBM RS/6000,
please send me the information on what changes were
necessary (specifically, what m- and s- header files
did you use?).

Any information would be greatly appreciated.

David Knodel
knodel@snoopy.Colorado.EDU

paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) (12/20/90)

knodel@news.colorado.edu (KNODEL DAVID) writes:

>If anyone has nn running on an IBM RS/6000, please send me the information
>on what changes were necessary (specifically, what m- and s- header files
>did you use?).

The enclosed files made it compile and run, however on our 6K/540, the 
display is messed up and requires repeated ^L to see anything.  This may
be a bug in the supplied curses library.

#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 12/20/1990 02:11 UTC by paul@uxc.cso.uiuc.edu
# Source directory /tmp
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    445 -rw-r--r-- s-aix3.h
#   1794 -rw-r--r-- m-rs6000.h
#
# ============= s-aix3.h ==============
if test -f 's-aix3.h' -a X"$1" != X"-c"; then
	echo 'x - skipping s-aix3.h (File already exists)'
else
echo 'x - extracting s-aix3.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's-aix3.h' &&
/*
X *	This version is for AIX 3.1
X *	From: marcel@duteca.tudelft.nl (Marcel J.E. Mol)
X */
X
/*
X *	Notice: AIX's PRINTER command is "print"  (see config.h)
X */
X
#include <s-sys5.h>
X
/*
X *    AIX does have void signal handlers, but
X *    a   typedef void   does not work
X */
X
#undef	SIGNAL_HANDLERS_ARE_VOID
X
/*
X *	Define HAVE_GETHOSTNAME if your system provides a BSD like
X *	gethostname routine.
X */
X
#undef  HAVE_UNAME
#define	HAVE_GETHOSTNAME
X
SHAR_EOF
chmod 0644 s-aix3.h ||
echo 'restore of s-aix3.h failed'
Wc_c="`wc -c < 's-aix3.h'`"
test 445 -eq "$Wc_c" ||
	echo 's-aix3.h: original size 445, current size' "$Wc_c"
fi
# ============= m-rs6000.h ==============
if test -f 'm-rs6000.h' -a X"$1" != X"-c"; then
	echo 'x - skipping m-rs6000.h (File already exists)'
else
echo 'x - extracting m-rs6000.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'm-rs6000.h' &&
X
/************** Machine (and compiler) dependent definitions. **************
X *
X *	Define appropriate types for the following ranges of integer
X *	variables.  These are processor & compiler dependent, but the
X *	distributed definitions will probably work on most systems.
X */
X
X
X
/*      MACHINE TYPE	DEFINED TYPE		VALUE RANGE	*/
X
typedef unsigned char	int8;		/*        0 ..     255 */
typedef short		int16;		/*  -10,000 ..  10,000 */
typedef long		int32;		/* -100,000 .. 100,000 */
typedef unsigned long	uint32;		/* 	  0 ..  2^31-1 */
X
X
/*
X * 	Define NO_VARARGS if the varargs feature is not available.
X *
X *	Also define NO_VARARGS if the vprintf/vsprintf routines are not
X *	available (however, this will only by safe on some machines, like
X *	the VAX).
X *
X *	Defining NO_VARARGS in the m- file should only be done for
X *	architectures which does not support it in general, or where
X *	a majority of the systems available on that architecture
X *	doesn't have it.  Otherwise, it should be defined in the
X *	s- file, because this is primarily OS dependent.
X *
X *	NO_VARARGS can be overruled by defining HAVE_VARARGS in the s-
X *	file.
X */
X
/* #define NO_VARARGS /* unless HAVE_VARARGS */
X
/*
X *	Define STRCSPN if the strcspn() function is not available.
X */
X
/* #define STRCSPN 	/* */
X
/*
X *	Define NO_SIGINTERRUPT on BSD based systems which don't have
X *	a siginterrupt() function, but provides an SV_INTERRUPT flag
X *	in <signal.h>.
X */
X
/* #define NO_SIGINTERRUPT	/* */
X
X
#ifdef NETWORK_DATABASE
X
/*
X *	Define NETWORK_BYTE_ORDER if the machine's int32's are
X *	already in network byte order, i.e. m68k based.
X */
X
#define NETWORK_BYTE_ORDER	/* */
X
/*
X *	OTHERWISE provide the functions/macros ntohl/htonl to
X *	convert longs from and to network byte order
X */
X
#endif	/* NETWORK DATABASE */
SHAR_EOF
chmod 0644 m-rs6000.h ||
echo 'restore of m-rs6000.h failed'
Wc_c="`wc -c < 'm-rs6000.h'`"
test 1794 -eq "$Wc_c" ||
	echo 'm-rs6000.h: original size 1794, current size' "$Wc_c"
fi
exit 0
--
         Paul Pomes

UUCP: {att,iuvax,uunet}!uiucuxc!paul   Internet, BITNET: paul@uxc.cso.uiuc.edu
US Mail:  UofIllinois, CSO, 1304 W Springfield Ave, Urbana, IL  61801-2910

ron@woan (Ronald S. Woan) (12/21/90)

In article <knodel.661641424@snoopy.Colorado.EDU>,
knodel@news.colorado.edu (KNODEL DAVID) writes:
David> If anyone has nn running on an IBM RS/6000, please send me the
David> information on what changes were necessary (specifically, what
David> m- and s- header files did you use?).

Another question for the FAQ posting if anybody cares to volunteer to
draw one up... Anyway no source modifications are required if compiled
with the m-vax.h and s-bsd4-3.h files in the appropriate places in
config.h and "-Iconf -O -qnoro" for CFLAGS in the Makefile. Also make
sure -lcurses is the only library definition linked in when nn is
linked... No ^L problems when compiled this way either and these
instructions are good for version 6.4 PL 4 (I don't know about others).

+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan       woan@peyote.cactus.org or woan%austin@iinus1.ibm.com +
+ other email addresses             Prodigy: XTCR74A Compuserve: 73530,2537 +

marius@rhi.hi.is (Marius Olafsson) (12/22/90)

In <1990Dec20.021423.4899@ux1.cso.uiuc.edu> paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) writes:

>The enclosed files made it compile and run, however on our 6K/540, the 
>display is messed up and requires repeated ^L to see anything.  This may
>be a bug in the supplied curses library.

Try changing 

#define RAW_MODE_ON    ioctl(0, TCSETAF, &raw_tty)
#define RAW_MODE_OFF   ioctl(0, TCSETAF, &norm_tty)

to

#define RAW_MODE_ON    ioctl(0, TCSETAW, &raw_tty)
#define RAW_MODE_OFF   ioctl(0, TCSETAW, &norm_tty)

in the file term.c - this fixes the problem here.

kevin@msa3b.UUCP (Kevin P. Kleinfelter) (12/22/90)

knodel@news.colorado.edu (KNODEL DAVID) writes:

>If anyone has nn running on an IBM RS/6000,
>please send me the information on what changes were
>necessary (specifically, what m- and s- header files
>did you use?).

Maybe post it.  Our site would like it too, and I imagine that other sites
could use the info.
-- 
Kevin Kleinfelter @ Dun and Bradstreet Software, Inc (404) 239-2347
{emory,gatech}!nanovx!msa3b!kevin

Soon to become {emory,gatech}!nanovx!dbses0!kevin  (But not yet!)