#!/bin/sh
# This is `vwcurses.07' (part 7 of a multipart archive).
# Do not concatenate these parts, unpack them in order with `/bin/sh'.
# File `vw_curses/termlib/termcap' is being continued...
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  echo 'WARNING: not restoring timestamps.  Consider getting and'
  echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if test ! -r _sharseq.tmp; then
  echo 'Please unpack part 1 first!'
  exit 1
fi
shar_sequence=`cat _sharseq.tmp`
if test "$shar_sequence" != 7; then
  echo "Please unpack part $shar_sequence next!"
  exit 1
fi
if test ! -f _sharnew.tmp; then
  echo 'x - still skipping vw_curses/termlib/termcap'
else
  echo 'x - continuing file vw_curses/termlib/termcap'
  sed 's/^X//' << 'SHAR_EOF' >> '_sharuue.tmp' &&
M/5Q%43IH;SU<14@Z7`H).FEM/5Q%4#II<#TV.FQI(S(T.FYD/5Q%0SIP=#IS
M;SU<14\Q.G-E/5Q%3S`Z=7`]7$5!.@I$-'PS,#0U?&1M,S`T-7QD871A;65D
M:6$@,S`T-6$Z7`H).FES/5Q%55Q%5CID;SU>2CI<"@DZ86TZ;&4]7D@Z8G,Z
M8V0],EQ%2CIC93U<14LZ8VP],EQ%33IC;3U<15DE<B4K("4K(#IC;R,X,#I<
M"@DZ9&,]-EQ%0CID;3TZ960].F5I/5Q%4#IH;SU<14@Z:6,].FEM/5Q%4#II
M<#TV.EP*"3IK,#U<17E<<CIK,3U<17!<<CIK,CU<17%<<CIK,SU<17)<<CIK
M-#U<17-<<CI<"@DZ:S4]7$5T7'(Z:S8]7$5U7'(Z:S<]7$5V7'(Z:S@]7$5W
M7'(Z:SD]7$5X7'(Z7`H).FMH/5Q%2#IK=3U<14$Z:W(]7$5#.FQI(S(T.FYD
M/5Q%0SIP8SU<,3<W.G!T.F5O.G5L.G5P/5Q%03IX;CH*(PHC($DZ($E"32P@
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03IK9#U<15M".FML/5Q%6T,Z
M:W(]7$5;1#IK8CU>2#I<"@DZ86P]7$5;3#ID;#U<15M-.FQE/5Y(.F-M/5Q%
M6R5I)60[)61(.FYD/5Q%6T,Z=7`]7$5;03I<"@DZ8V4]7$5;2SIH;SU<15M(
M.F1C/5Q%6U`Z:6,]7$5;0#I<"@DZ<V\]7$5;,FTZ<V4]7$5;;3IU<SU<15LT
M;3IU93U<15MM.FUR/5Q%6S=M.FUB/5Q%6S<[,FTZ;64]7$5;;3H*(PHC($5.
-1"!/1B!415)-0T%0"EQ%
`
end
SHAR_EOF
  echo 'File vw_curses/termlib/termcap is complete' &&
  echo 'uudecoding file vw_curses/termlib/termcap' &&
  uudecode _sharuue.tmp < _sharuue.tmp && rm -f _sharuue.tmp &&
  $shar_touch -am 0627091295 'vw_curses/termlib/termcap' &&
  chmod 0644 'vw_curses/termlib/termcap' ||
  echo 'restore of vw_curses/termlib/termcap failed'
  shar_count="`wc -c < 'vw_curses/termlib/termcap'`"
  test 22333 -eq "$shar_count" ||
    echo "vw_curses/termlib/termcap: original size 22333, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= vw_curses/test/Makefile ==============
if test ! -d 'vw_curses/test'; then
  echo 'x - creating directory vw_curses/test'
  mkdir 'vw_curses/test'
fi
if test -f 'vw_curses/test/Makefile' && test X"$1" != X"-c"; then
  echo 'x - skipping vw_curses/test/Makefile (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting vw_curses/test/Makefile (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/test/Makefile' &&
EXECS= twinkle 
X
CFLAGS= -O2
CPPFLAGS= -DVxWorks -I$(VWDIR)/h -I../h
LDFLAGS= -L../lib
X
CC= gcc68k
AS= gas
LD= ld68k
INSTALL= cp -p
X
# Root directory for VxWorks
VWDIR=/vx
X
X
COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
COMPILE.cc= $(C++) $(CFLAGS) $(CPPFLAGS) -c
LINK.cc= $(C++) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
LINK= $(LD) $(LDFLAGS)
X
X.c.o:
X	$(COMPILE.c) $*.c
X
X.s.o:
X
X
X
all: $(EXECS)
X
twinkle: twinkle.o random.o
X	$(LINK) -r -o $@ twinkle.o random.o -lcurses -ltermlib
X
X
clean: force
X	rm -f twinkle.o random.o $(EXECS)
X
# dummy target to force execution of a rule
force:
X
SHAR_EOF
  $shar_touch -am 0627110495 'vw_curses/test/Makefile' &&
  chmod 0644 'vw_curses/test/Makefile' ||
  echo 'restore of vw_curses/test/Makefile failed'
  shar_count="`wc -c < 'vw_curses/test/Makefile'`"
  test 617 -eq "$shar_count" ||
    echo "vw_curses/test/Makefile: original size 617, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= vw_curses/test/README ==============
if test -f 'vw_curses/test/README' && test X"$1" != X"-c"; then
  echo 'x - skipping vw_curses/test/README (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting vw_curses/test/README (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/test/README' &&
The twinkle program is for testing curses and termlib. 
X
First 'make install' in the curses and termlib directories to build 
those libraries as appropriate. Then edit the TERMINAL type in twinkle.c
and 'make' in this directory.
X
Use 'ld </xxx/twinkle' to load twinkle from the VxWorks shell, and just 
'twinkle' to run.
X
Note: Twinkle needs random numbers, so random.c is thrown in here.
SHAR_EOF
  $shar_touch -am 0627091195 'vw_curses/test/README' &&
  chmod 0644 'vw_curses/test/README' ||
  echo 'restore of vw_curses/test/README failed'
  shar_count="`wc -c < 'vw_curses/test/README'`"
  test 389 -eq "$shar_count" ||
    echo "vw_curses/test/README: original size 389, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= vw_curses/test/twinkle.c ==============
if test -f 'vw_curses/test/twinkle.c' && test X"$1" != X"-c"; then
  echo 'x - skipping vw_curses/test/twinkle.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting vw_curses/test/twinkle.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/test/twinkle.c' &&
#include <stdio.h>
#include <stdlib.h>
#include <curses.h>
X
/*
X * Curses demo program 'twinkle', from Sun Programmer's Guide vol. 2.
X * Before compiling, set TERMINAL definition below as appropriate.
X *
X * Notes:
X * This version does not use signals.
X * VxWorks version of curses always uses Def_term (there's no getenv()).
X * initscr() seems to require about 41000 bytes from malloc(), so
X *   at least 45000 should be made available.
X * Remember: The OK macro is set by curses.h, so it can't be used for
X *   VxWorks calls anymore! Use VX_OK instead (defined in ../h/stdio.h).
X */
X
#define TERMINAL "vt100"
X
#define	NCOLS 80
#define	NLINES 24
#define MAXPATTERNS 4
X
struct locs  {
X   char y,x;
};
X
typedef struct locs LOCS;
X
LOCS Layout [NCOLS * NLINES];   /* current board layout */
X
int Pattern,                    /* current pattern number */
X    Numstars;                   /* number of stars in pattern */
X
void makeboard();
bool ison(reg int y, reg int x);
void puton(reg char ch);
X
int twinkle()
{
X   int i;
X
X   srandom(1);
X
X   /* Initialize curses: set default terminal type (always used on
X    * VxWorks) and call initscr(), checking to be sure there's enough
X    * malloc() free store. Then set various parameters.
X    */
X   strcpy(Def_term,TERMINAL);
X   if (initscr()==ERR)  {
X      fprintf(stderr,"twinkle: Error from initscr (not enough free store)\n");
X      exit(1);
X   }
X   noecho();
X   leaveok(stdscr, TRUE);
X   scrollok(stdscr, FALSE);
X
X   /* main loop */
X   for (i=1; i<=10; i++)  {
X      makeboard();              /* make the board setup */
X      puton('*');               /* put on '*'s */
X      puton(' ');               /* cover up with ' 's */
X   }
X
X   /* Shut down curses: move the cursor to the lower-left corner
X    * by direct addressing, since current location is not guaranteed.
X    * We lie and say we used to be at upper right corner to ensure
X    * absolute addressing.
X    */
X   mvcur(0,COLS-1, LINES-1,0);
X   fflush(stdout);     /* always flush after mvcur() */
X   endwin();
X
X   exit(0);
}
X
X
/*
X * Make the current board setup. It picks a random pattern and calls
X * ison() to determine if the character is on that pattern or not.
X */
void makeboard()
{
X   reg int y,x;
X   reg LOCS *lp;
X
X   Pattern = random() % MAXPATTERNS;
X   lp=Layout;
X   for (y=0; y<NLINES; y++)
X      for (x=0; x<NCOLS; x++)
X         if (ison(y,x))  {
X            lp->y=y;
X            lp++->x=x;
X         }
X   Numstars=lp-Layout;
}
X
/*
X * Return TRUE if (y,x) is on the current pattern.
X */
bool ison(reg int y, reg int x)
{
X   switch (Pattern)  {
X      case 0:     /* alternating lines */
X         return !(y & 01);
X      case 1:     /* box */
X         if (x>=LINES && y>=NCOLS)
X            return FALSE;
X         if (y<3 || y>=NLINES-3)
X            return TRUE;
X         return(x<3 || x>=NCOLS-3);
X      case 2:     /* holy pattern! */
X         return((x+y) & 01);
X      case 3:     /* bar across center */
X         return(y>=9 && y<=15);
X      default:
X         exit(2);
X   }
X   /* NOTREACHED */
}
X
void puton(reg char ch)
{
X   reg LOCS *lp;
X   reg int r;
X   reg LOCS *end;
X   LOCS temp;
X
X   end=&Layout[Numstars];
X   for (lp=Layout; lp<end; lp++)  {
X      r=random() % Numstars;
X      temp=*lp;
X      *lp=Layout[r];
X      Layout[r]=temp;
X   }
X
X   for (lp=Layout; lp<end; lp++)  {
X      mvaddch(lp->y, lp->x, ch);
X      refresh();
X   }
}
SHAR_EOF
  $shar_touch -am 0627091195 'vw_curses/test/twinkle.c' &&
  chmod 0644 'vw_curses/test/twinkle.c' ||
  echo 'restore of vw_curses/test/twinkle.c failed'
  shar_count="`wc -c < 'vw_curses/test/twinkle.c'`"
  test 3350 -eq "$shar_count" ||
    echo "vw_curses/test/twinkle.c: original size 3350, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= vw_curses/test/random.c ==============
if test -f 'vw_curses/test/random.c' && test X"$1" != X"-c"; then
  echo 'x - skipping vw_curses/test/random.c (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting vw_curses/test/random.c (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/test/random.c' &&
/*
X * Copyright (c) 1983 Regents of the University of California.
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms are permitted
X * provided that the above copyright notice and this paragraph are
X * duplicated in all such forms and that any documentation,
X * advertising materials, and other materials related to such
X * distribution and use acknowledge that the software was developed
X * by the University of California, Berkeley.  The name of the
X * University may not be used to endorse or promote products derived
X * from this software without specific prior written permission.
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)random.c	5.5 (Berkeley) 7/6/88";
#endif /* LIBC_SCCS and not lint */
X
#include <stdio.h>
X
/*
X * random.c:
X * An improved random number generation package.  In addition to the standard
X * rand()/srand() like interface, this package also has a special state info
X * interface.  The initstate() routine is called with a seed, an array of
X * bytes, and a count of how many bytes are being passed in; this array is then
X * initialized to contain information for random number generation with that
X * much state information.  Good sizes for the amount of state information are
X * 32, 64, 128, and 256 bytes.  The state can be switched by calling the
X * setstate() routine with the same array as was initiallized with initstate().
X * By default, the package runs with 128 bytes of state information and
X * generates far better random numbers than a linear congruential generator.
X * If the amount of state information is less than 32 bytes, a simple linear
X * congruential R.N.G. is used.
X * Internally, the state information is treated as an array of longs; the
X * zeroeth element of the array is the type of R.N.G. being used (small
X * integer); the remainder of the array is the state information for the
X * R.N.G.  Thus, 32 bytes of state information will give 7 longs worth of
X * state information, which will allow a degree seven polynomial.  (Note: the 
X * zeroeth word of state information also has some other information stored
X * in it -- see setstate() for details).
X * The random number generation technique is a linear feedback shift register
X * approach, employing trinomials (since there are fewer terms to sum up that
X * way).  In this approach, the least significant bit of all the numbers in
X * the state table will act as a linear feedback shift register, and will have
X * period 2^deg - 1 (where deg is the degree of the polynomial being used,
X * assuming that the polynomial is irreducible and primitive).  The higher
X * order bits will have longer periods, since their values are also influenced
X * by pseudo-random carries out of the lower bits.  The total period of the
X * generator is approximately deg*(2**deg - 1); thus doubling the amount of
X * state information has a vast influence on the period of the generator.
X * Note: the deg*(2**deg - 1) is an approximation only good for large deg,
X * when the period of the shift register is the dominant factor.  With deg
X * equal to seven, the period is actually much longer than the 7*(2**7 - 1)
X * predicted by this formula.
X */
X
X
X
/*
X * For each of the currently supported random number generators, we have a
X * break value on the amount of state information (you need at least this
X * many bytes of state info to support this random number generator), a degree
X * for the polynomial (actually a trinomial) that the R.N.G. is based on, and
X * the separation between the two lower order coefficients of the trinomial.
X */
X
#define		TYPE_0		0		/* linear congruential */
#define		BREAK_0		8
#define		DEG_0		0
#define		SEP_0		0
X
#define		TYPE_1		1		/* x**7 + x**3 + 1 */
#define		BREAK_1		32
#define		DEG_1		7
#define		SEP_1		3
X
#define		TYPE_2		2		/* x**15 + x + 1 */
#define		BREAK_2		64
#define		DEG_2		15
#define		SEP_2		1
X
#define		TYPE_3		3		/* x**31 + x**3 + 1 */
#define		BREAK_3		128
#define		DEG_3		31
#define		SEP_3		3
X
#define		TYPE_4		4		/* x**63 + x + 1 */
#define		BREAK_4		256
#define		DEG_4		63
#define		SEP_4		1
X
X
/*
X * Array versions of the above information to make code run faster -- relies
X * on fact that TYPE_i == i.
X */
X
#define		MAX_TYPES	5		/* max number of types above */
X
static  int		degrees[ MAX_TYPES ]	= { DEG_0, DEG_1, DEG_2,
X								DEG_3, DEG_4 };
X
static  int		seps[ MAX_TYPES ]	= { SEP_0, SEP_1, SEP_2,
X								SEP_3, SEP_4 };
X
X
X
/*
X * Initially, everything is set up as if from :
X *		initstate( 1, &randtbl, 128 );
X * Note that this initialization takes advantage of the fact that srandom()
X * advances the front and rear pointers 10*rand_deg times, and hence the
X * rear pointer which starts at 0 will also end up at zero; thus the zeroeth
X * element of the state information, which contains info about the current
X * position of the rear pointer is just
X *	MAX_TYPES*(rptr - state) + TYPE_3 == TYPE_3.
X */
X
static  long		randtbl[ DEG_3 + 1 ]	= { TYPE_3,
X			    0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 
X			    0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb, 
X			    0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd, 
X			    0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 
X			    0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7, 
X			    0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc, 
X			    0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 
X					0xf5ad9d0e, 0x8999220b, 0x27fb47b9 };
X
/*
X * fptr and rptr are two pointers into the state info, a front and a rear
X * pointer.  These two pointers are always rand_sep places aparts, as they cycle
X * cyclically through the state information.  (Yes, this does mean we could get
X * away with just one pointer, but the code for random() is more efficient this
X * way).  The pointers are left positioned as they would be from the call
X *			initstate( 1, randtbl, 128 )
X * (The position of the rear pointer, rptr, is really 0 (as explained above
X * in the initialization of randtbl) because the state table pointer is set
X * to point to randtbl[1] (as explained below).
X */
X
static  long		*fptr			= &randtbl[ SEP_3 + 1 ];
static  long		*rptr			= &randtbl[ 1 ];
X
X
X
/*
X * The following things are the pointer to the state information table,
X * the type of the current generator, the degree of the current polynomial
X * being used, and the separation between the two pointers.
X * Note that for efficiency of random(), we remember the first location of
X * the state information, not the zeroeth.  Hence it is valid to access
X * state[-1], which is used to store the type of the R.N.G.
X * Also, we remember the last location, since this is more efficient than
X * indexing every time to find the address of the last element to see if
X * the front and rear pointers have wrapped.
X */
X
static  long		*state			= &randtbl[ 1 ];
X
static  int		rand_type		= TYPE_3;
static  int		rand_deg		= DEG_3;
static  int		rand_sep		= SEP_3;
X
static  long		*end_ptr		= &randtbl[ DEG_3 + 1 ];
X
X
X
/*
X * srandom:
X * Initialize the random number generator based on the given seed.  If the
X * type is the trivial no-state-information type, just remember the seed.
X * Otherwise, initializes state[] based on the given "seed" via a linear
X * congruential generator.  Then, the pointers are set to known locations
X * that are exactly rand_sep places apart.  Lastly, it cycles the state
X * information a given number of times to get rid of any initial dependencies
X * introduced by the L.C.R.N.G.
X * Note that the initialization of randtbl[] for default usage relies on
X * values produced by this routine.
X */
X
void srandom( x )
X
X    unsigned		x;
{
X    	register  int		i, j;
X	long random();
X
X	if(  rand_type  ==  TYPE_0  )  {
X	    state[ 0 ] = x;
X	}
X	else  {
X	    j = 1;
X	    state[ 0 ] = x;
X	    for( i = 1; i < rand_deg; i++ )  {
X		state[i] = 1103515245*state[i - 1] + 12345;
X	    }
X	    fptr = &state[ rand_sep ];
X	    rptr = &state[ 0 ];
X	    for( i = 0; i < 10*rand_deg; i++ )  random();
X	}
}
X
X
X
/*
X * initstate:
X * Initialize the state information in the given array of n bytes for
X * future random number generation.  Based on the number of bytes we
X * are given, and the break values for the different R.N.G.'s, we choose
X * the best (largest) one we can and set things up for it.  srandom() is
X * then called to initialize the state information.
X * Note that on return from srandom(), we set state[-1] to be the type
X * multiplexed with the current value of the rear pointer; this is so
X * successive calls to initstate() won't lose this information and will
X * be able to restart with setstate().
X * Note: the first thing we do is save the current state, if any, just like
X * setstate() so that it doesn't matter when initstate is called.
X * Returns a pointer to the old state.
X */
X
char  *
initstate( seed, arg_state, n )
X
X    unsigned		seed;			/* seed for R. N. G. */
X    char		*arg_state;		/* pointer to state array */
X    int			n;			/* # bytes of state info */
{
X	register  char		*ostate		= (char *)( &state[ -1 ] );
X
X	if(  rand_type  ==  TYPE_0  )  state[ -1 ] = rand_type;
X	else  state[ -1 ] = MAX_TYPES*(rptr - state) + rand_type;
X	if(  n  <  BREAK_1  )  {
X	    if(  n  <  BREAK_0  )  {
X		fprintf( stderr, "initstate: not enough state (%d bytes) with which to do jack; ignored.\n", n );
X		return(NULL);
X	    }
X	    rand_type = TYPE_0;
X	    rand_deg = DEG_0;
X	    rand_sep = SEP_0;
X	}
X	else  {
X	    if(  n  <  BREAK_2  )  {
X		rand_type = TYPE_1;
X		rand_deg = DEG_1;
X		rand_sep = SEP_1;
X	    }
X	    else  {
X		if(  n  <  BREAK_3  )  {
X		    rand_type = TYPE_2;
X		    rand_deg = DEG_2;
X		    rand_sep = SEP_2;
X		}
X		else  {
X		    if(  n  <  BREAK_4  )  {
X			rand_type = TYPE_3;
X			rand_deg = DEG_3;
X			rand_sep = SEP_3;
X		    }
X		    else  {
X			rand_type = TYPE_4;
X			rand_deg = DEG_4;
X			rand_sep = SEP_4;
X		    }
X		}
X	    }
X	}
X	state = &(  ( (long *)arg_state )[1]  );	/* first location */
X	end_ptr = &state[ rand_deg ];	/* must set end_ptr before srandom */
X	srandom( seed );
X	if(  rand_type  ==  TYPE_0  )  state[ -1 ] = rand_type;
X	else  state[ -1 ] = MAX_TYPES*(rptr - state) + rand_type;
X	return( ostate );
}
X
X
X
/*
X * setstate:
X * Restore the state from the given state array.
X * Note: it is important that we also remember the locations of the pointers
X * in the current state information, and restore the locations of the pointers
X * from the old state information.  This is done by multiplexing the pointer
X * location into the zeroeth word of the state information.
X * Note that due to the order in which things are done, it is OK to call
X * setstate() with the same state as the current state.
X * Returns a pointer to the old state information.
X */
X
char  *
setstate( arg_state )
X
X    char		*arg_state;
{
X	register  long		*new_state	= (long *)arg_state;
X	register  int		type		= new_state[0]%MAX_TYPES;
X	register  int		rear		= new_state[0]/MAX_TYPES;
X	char			*ostate		= (char *)( &state[ -1 ] );
X
X	if(  rand_type  ==  TYPE_0  )  state[ -1 ] = rand_type;
X	else  state[ -1 ] = MAX_TYPES*(rptr - state) + rand_type;
X	switch(  type  )  {
X	    case  TYPE_0:
X	    case  TYPE_1:
X	    case  TYPE_2:
X	    case  TYPE_3:
X	    case  TYPE_4:
X		rand_type = type;
X		rand_deg = degrees[ type ];
X		rand_sep = seps[ type ];
X		break;
X
X	    default:
X		fprintf( stderr, "setstate: state info has been munged; not changed.\n" );
X	}
X	state = &new_state[ 1 ];
X	if(  rand_type  !=  TYPE_0  )  {
X	    rptr = &state[ rear ];
X	    fptr = &state[ (rear + rand_sep)%rand_deg ];
X	}
X	end_ptr = &state[ rand_deg ];		/* set end_ptr too */
X	return( ostate );
}
X
X
X
/*
X * random:
X * If we are using the trivial TYPE_0 R.N.G., just do the old linear
X * congruential bit.  Otherwise, we do our fancy trinomial stuff, which is the
X * same in all ther other cases due to all the global variables that have been
X * set up.  The basic operation is to add the number at the rear pointer into
X * the one at the front pointer.  Then both pointers are advanced to the next
X * location cyclically in the table.  The value returned is the sum generated,
X * reduced to 31 bits by throwing away the "least random" low bit.
X * Note: the code takes advantage of the fact that both the front and
X * rear pointers can't wrap on the same call by not testing the rear
X * pointer if the front one has wrapped.
X * Returns a 31-bit random number.
X */
X
long
random()
{
X	long		i;
X	
X	if(  rand_type  ==  TYPE_0  )  {
X	    i = state[0] = ( state[0]*1103515245 + 12345 )&0x7fffffff;
X	}
X	else  {
X	    *fptr += *rptr;
X	    i = (*fptr >> 1)&0x7fffffff;	/* chucking least random bit */
X	    if(  ++fptr  >=  end_ptr  )  {
X		fptr = state;
X		++rptr;
X	    }
X	    else  {
X		if(  ++rptr  >=  end_ptr  )  rptr = state;
X	    }
X	}
X	return( i );
}
X
SHAR_EOF
  $shar_touch -am 0627091295 'vw_curses/test/random.c' &&
  chmod 0644 'vw_curses/test/random.c' ||
  echo 'restore of vw_curses/test/random.c failed'
  shar_count="`wc -c < 'vw_curses/test/random.c'`"
  test 12804 -eq "$shar_count" ||
    echo "vw_curses/test/random.c: original size 12804, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= vw_curses/README ==============
if test -f 'vw_curses/README' && test X"$1" != X"-c"; then
  echo 'x - skipping vw_curses/README (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting vw_curses/README (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'vw_curses/README' &&
This is curses and termlib for VxWorks 4.0.2. (OS dependence is minimal, so
it should work, or just about, with 5.0 too).
X
Curses allows you to manage text windows nicely, including scrolling of
arbitrary rectangular text regions, overlapping windows, etc. Termlib
is used by curses to allow it to work with almost any cursor-addressible 
terminal or terminal emulator. The version of curses that I started with
(4.3 Tahoe) was full of nasty bugs, most of which should be fixed by now,
but you may still be able to find some. 
X
For the VxWorks version, I added semaphore locking to curses so that multiple 
processes can use it.  The termlib routines have no locking, but you should 
be OK because they are called by curses, which is locked. Both curses and 
termlib use static variables (e.g. 'Def_term' variable and 'genbuf' buffer 
for the current termcap entry in curses, 'tbuf' pointer in termlib), which
you have to be careful about. This should not cause a problem unless you want 
to have two totally independent displays or other fanciness. The bottom line 
is: this works very well for me. However, it is useful to understand the
historical kludge perpetrated by termlib to access the terminal capability
currently in use by the application (e.g. for operations such as tgetstr()):
The termcap entry is initialized by curses during the initscr() call, which
uses tgetent() to get the termcap from termlib. The entry is held by curses 
in a static character buffer ('genbuf'). The termlib routines keep their 
own static character pointer, 'tbuf', which points at 'genbuf'. If you call
tgetstr(), then termlib uses 'tbuf' to look through the termcap entry being 
used by curses. As you can well imagine, this means there can be only one 
"current" termcap. To stay out of trouble, call initscr() only once and
from only one task, and avoid calling the tgetent() routine yourself.
X
X
Usual disclaimer: This software is provided ``as is'' and without any express
or implied warranties. My employer (ISTS) is in no way responsible for its 
contents. Any bugs you encounter you will have to fix yourself.
X
Caution: The curses.h include file defines the preprocessor macros OK and ERR.
Unfortunately, VxWorks also defines OK, and does so differently. My solution
has been to use VX_OK for VxWorks instead (see h/stdio.h), and let curses
have OK. You may want to do things the other way around, so I also define
CURSES_OK. Your code must then fix the OK macro after #including curses.h.
X
Good luck. If you have any questions, improvements, bug fixes, etc. send
them to georg@sgl.ists.ca.
X
Georg Feil
Space Geodynamics Laboratory
ISTS, 2700 Steeles Ave West
Concord, Ontario
(416) 665-5458
--------------------------------------------------------------------
X
To install,
X
1) Cd to the termlib directory, and edit the Makefile there. Set VWDIR to 
X   your local VxWorks root directory. Set other things such as the tools to
X   use (default is the GNU tools gcc, gld etc.)  
X
2) If your VxWorks target system has a file system, copy the termcap file 
X   over to it, and set the appropriate pathname in termcap.c (DEF_FILE).
X   If there is no file system, add any necessary capability entries to
X   the termcaps[] array in termcap.c, combining multiple lines into one
X   as has been done with the existing entries. You may need to look in your
X   own system's termcap file (usually /etc/termcap) to find entries.
X
3) Type 'make install' to build the termlib library, libtermlib.a. It will
X   be placed in the lib directory.
X
4) Cd to the curses directory, and edit the Makefile as in step (1).
X
5) Type 'make install' to build the curses library, libcurses.a. It will
X   be placed in the lib directory.
X
6) Cd to the test directory and edit the Makefile. Set the TERMINAL type
X   as desired by editing twinkle.c, then type 'make' to build the
X   test program twinkle.
X
7) Use 'ld </xxx/test/twinkle' from the VxWorks shell to load the test program,
X   and then 'twinkle' to run it. Twinkle draws various patterns of asterisks 
X   on the screen. You can use twinkle.c as a template for your curses programs.
X
Note: The header directory ./h contains a few header files I like to use
X      that are not normally part of VxWorks.
X
SHAR_EOF
  $shar_touch -am 0627091195 'vw_curses/README' &&
  chmod 0644 'vw_curses/README' ||
  echo 'restore of vw_curses/README failed'
  shar_count="`wc -c < 'vw_curses/README'`"
  test 4226 -eq "$shar_count" ||
    echo "vw_curses/README: original size 4226, current size $shar_count"
  rm -f _sharnew.tmp
fi
# ============= vw_curses/README.2nd ==============
if test -f 'vw_curses/README.2nd' && test X"$1" != X"-c"; then
  echo 'x - skipping vw_curses/README.2nd (file already exists)'
  rm -f _sharnew.tmp
else
  > _sharnew.tmp
  echo 'x - extracting vw_curses/README.2nd (binary)'
  sed 's/^X//' << 'SHAR_EOF' > _sharuue.tmp &&
begin 600 vw_curses/README.2nd
SHAR_EOF
  : || echo 'restore of vw_curses/README.2nd failed'
fi
echo 'End of archive part 7'
echo 'File vw_curses/README.2nd is continued in part 8'
echo 8 > _sharseq.tmp
exit 0
