ftp.nice.ch/pub/next/developer/resources/classes/CompSim.s.tar.gz#/CompSim/utility.h

This is utility.h in view mode; [Download] [Up]

//
// Utility functions for manipulating words.
//


#import <stdio.h>


#define	HIGHBIT		31
#define HIGHNIBBLE	 7
#define HIGHBYTE	 3


long getbit(long b, long n);
long getbits(long x, long p, long n);	// Page 49, K&R.
long getnibble(long b, long n);		// Get nibble (either high or low).
long getbyte(long w, long n);

long add(long a, long b);		// Adds them as 16-bit numbers.

int readline(FILE *file, char *buffer);


//
// End of file.
//

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.