//								Constants
//								---------
#define ErrAlrtID 	301
#define CntrlKey 0x3B
#define OptionKey 0x3A
#define OK ok
#define Cancel cancel

//								Macros
//								------
#define max(a,b) ((a>b) ? (a) : (b))
#define min(a,b) ((a<b) ? (a) : (b))

//								Type Definitions
//								----------------
typedef short double
	sdouble, *psdouble, **ppsdouble;

typedef unsigned char
	**ppc, *pc;
	
typedef struct {
	int		x; 			// x dimension 
	int 	y; 			// y dimension 
	short double  **e;	// pointer to array of pointer to the rows 	
	Boolean oneblock; 	//true if the space for rows is allocated as one block - so we can release properly	
} imgdr, *Pimgdr, **Himgdr;

typedef struct {
	int		x; 			// x dimension
	int 	y; 			// y dimension
	unsigned char  **e;	// pointer to array of pointer to the rows */
	Boolean oneblock; 	// true if the space for rows is allocated as one block - so we can release properly	
} imgd, *Pimgd, **Himgd;

//								Prototypes
//								----------
void 	myDisposePtr(Ptr p);
void 	demsg(char * arg_list, ...);
void 	dbgmsg(char * arg_list, ...);
pascal void		OutlineOK (DialogPtr, int);
void 	CenterDialog (DialogTHndl dt);
Boolean FindAProcess (OSType signature, ProcessSerialNumber *process,ProcessInfoRec *infoRec, FSSpecPtr aFSSpecPtr);
void	Cycle(char *,char *);
Boolean istrue(char *s, Boolean dflt);
short 	isPressed(unsigned short);
double 	String2Real(Str255 str);
void 	Real2String(double n, int width, int fwidth, Str255 str);
void 	DimDialogItem(DialogPtr TheDialog, int item, int n);
int 	myGetDialogItem(DialogPtr TheDialog, int item);
void 	mySetDialogItem(DialogPtr TheDialog, int item, int n);
void 	SetDNum(DialogPtr TheDialog, int item, int n);
int 	GetDNum(DialogPtr TheDialog, int item);
void 	SetDReal(DialogPtr TheDialog, int item, double n, int fwidth);
double 	GetDReal(DialogPtr TheDialog, int item);
void 	SetDString(DialogPtr TheDialog, int item, Str255 str);
void 	GetDString(DialogPtr TheDialog, int item, Str255 str);
void 	freeimgr(Pimgdr m);
OSErr 	dimimgr(Pimgdr m, int y, int x);
OSErr 	dimimgr1(Pimgdr m, int y, int x);
void 	freeimg(Pimgd m);
OSErr 	dimimg(Pimgd m, int y, int x);
OSErr 	dimimg1(Pimgd m, int y, int x);
OSErr 	getline(short,char *,int); // get line of chars <100 nchars = # we got
OSErr	putline(short refNum,char *s);
void 	GetItemRect(DialogPtr TheDialog, int item, RectPtr ItemBox);
pascal void		OutlineOK (DialogPtr, int);

void 	PathNameFromDirID(long dirID, short vRefNum, StringPtr fullPathName);
void 	PathNameFromWD(long vRefNum, StringPtr pathName);
void 	pstrcat(StringPtr dst, StringPtr src);
void 	pstrcpy(StringPtr dst, StringPtr src);
void 	pstrinsert(StringPtr dst, StringPtr src);

Boolean GetFileToOpen(OSType filetype, FSSpec *target);
OSErr 	OpenInputFile(OSType filetype, FSSpecPtr, Str63,  short *refNum);
unsigned char 	
		*GetVers(void);
char 	*CGetVers(void);
