/* Env.h
   Useful stuff
   Last modified by D. Swinehart, May 14, 1982 2:01 pm */

#define	true	(-1)
#define	false	0
#define	byte	char

/* Packets are "big-endian", so all of their word-level values have their bytes backwards.
   A "num" is such a word that is normally fetched and swapped so that we can treat it as
   a number.  A "word" is such a word that is normally just left the way it is, except perhaps
   by special double-word routines that know how to manipulate it.  These are just conventions,
   which the programmer has to diligently follow.  Good luck to all. */
   
#define num int
	/* struct num { byte hiByte, loByte; }; Must be swapped to use */
#define word int
	/* struct word { byte hiByte, loByte; }; Normally left in big-endian form. */
#define swapped1 0400
#define swappedSign 0200

struct ShortSTRING {
	int length;
	int maxLength;
	char text[1]; };
    #define lenShortSTRING  2
    	/* fixed part. */
	
/* More conventions:
	struct longInt { int low, high; }; Standard long number.
	struct longNum { num low, high; }; Standard packetized Mesa long integer -- 
											word-level is right, byte-level wrong.
											
	Routines like DoubleDifference, DoubleIncrement work on longInts.
	Routines like DoubleDiff, DoubleInc work on longNums.
	We'll have to rename these if we ever want to get them into radix 50. */