home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
544a.lha
/
RPN_v1.0
/
Source
/
global.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-06
|
2KB
|
73 lines
/*--------------------------------------------*
| File: GLOBAL.h - MLO 900131 V1.00 |
| This file contains all definitions and |
| initialisation of the RPN global variables |
*--------------------------------------------*/
/*---------------------------*
| Global Intuition pointers |
*---------------------------*/
struct IntuitionBase *IntuitionBase = NULL;
struct GfxBase *GfxBase = NULL;
struct Window *Wrpn = NULL;
struct Window *Wreg = NULL;
struct RastPort *pRP = NULL;
struct Menu *MenuStrip = NULL;
struct Gadget *FirstGadget = NULL;
struct Gadget *pIG;
struct StringInfo *pIS;
/*----------------------*
| Global RPN variables |
*----------------------*/
int LastCode = -1; /* Last required operation */
Boolean MathError = False; /* Flag for mathematical errors */
double LastX = 0.0; /* 'Last X' register */
double ConvertD = 0.01745329252; /* Deg->default conversion factor */
double ConvertG = 0.01570796327; /* Grd->default conversion factor */
double ConvertR = 1.0; /* Rad->default conversion factor */
double Convert = 0.01745329252; /* Default setting (Degs) */
double Pig = 3.141592654;
/*---------------------------------------*
| Registers and Stack actual values ... |
*---------------------------------------*/
double reg[NREGS] = {
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0
};
double acc[NACCS] = {
0.0, 0.0, 0.0,
0.0, 0.0, 0.0
};
double stack[NSTACK] = {
0.0, 0.0, 0.0, 0.0
};
/*-----------------------------------*
| ... and their last printed values |
*-----------------------------------*/
double lastReg[NREGS] = {
1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0
};
double lastAcc[NACCS] = {
1.0, 1.0, 1.0,
1.0, 1.0, 1.0
};
double lastStack[NSTACK] = {
1.0, 1.0, 1.0, 1.0
};
char InBuf[INBUF_LEN] = ""; /* Input buffer */