home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 6
/
FreshFish_September1994.bin
/
new
/
util
/
misc
/
mcalc
/
source
/
mcalc.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-18
|
11KB
|
296 lines
/*
Auto: smake MCalc
*/
/* $Revision Header built automatically *************** (do not edit) ************
**
** © Copyright by GuntherSoft
**
** File : SnakeSYS:CPrgs/MUICalc/MCalc.h
** Created on : Saturday, 02.10.93 02:16:34
** Created by : Kai Iske
** Current revision : V1.4
**
**
** Purpose
** -------
** - Header-File for MCalc
**
** Revision V1.4
** --------------
** created on Thursday, 17.03.94 20:09:05 by Kai Iske. LogMessage :
** -*- changed on Donnerstag, 18.08.94 17:35:24 by Kai Iske. LogMessage :
** - MCalc didn`t even care about Percent calculations
** -*- changed on Sonntag, 07.08.94 20:30:27 by Kai Iske. LogMessage :
** - atan() wasn`t definied for some ranges (somehow)
** -*- changed on Sonntag, 07.08.94 20:17:13 by Kai Iske. LogMessage :
** - The InputString will be default object now
** -*- created on Thursday, 17.03.94 20:09:05 by Kai Iske. LogMessage :
** - Recompiled with Scanner generated by flex 2.4.6
**
** Revision V1.3
** --------------
** created on Friday, 11.02.94 23:34:08 by Kai Iske. LogMessage :
** -*- changed on Friday, 11.02.94 23:35:32 by Kai Iske. LogMessage :
** - One couldn`t use 1e3 for scientific notation of 1000. You
** had to write 1.0e3. Changed
** (Reported by : Henry Norman)
** - No more error lines will be copied from History
** (Requested by : Stefan Stuntz)
** -*- created on Friday, 11.02.94 23:34:08 by Kai Iske. LogMessage :
** - "Radiant" was wrong. Changed. Why didn`t anybody tell me.
** (Reported by : Henry Norman)
** - Chose wrong case for mathematical "e".
** (Reported by : Henry Norman)
**
** Revision V1.2
** --------------
** created on Tuesday, 19.10.93 23:41:00 by Kai Iske. LogMessage :
** -*- changed on Wednesday, 08.12.93 23:48:31 by Kai Iske. LogMessage :
** - Default number of history lines increased
** (Requested by : Stefan Stuntz)
** -*- changed on Sunday, 05.12.93 22:30:41 by Kai Iske. LogMessage :
** - No checks were made on the ENTRY argument to an ARexx
** function
** -*- changed on Sunday, 05.12.93 18:13:56 by Kai Iske. LogMessage :
** - For calculations via ARexx one can set the type, size, sign
** and angle flags seperately, now
** -*- changed on Sunday, 05.12.93 17:50:09 by Kai Iske. LogMessage :
** - Improved error handling from within ARexx commands a bit
** -*- changed on Sunday, 05.12.93 17:46:35 by Kai Iske. LogMessage :
** - MUIProCalc may output TeX style mathematical expressions
** when using the ARexx commands. Additionally there is another
** option to convert expressions to TeX format.
** (Requested by : Volker Güth)
** -*- changed on Sunday, 05.12.93 16:47:59 by Kai Iske. LogMessage :
** - Added more ARexx functions to the default ones
** (CALC, GETINPUT, GETOUTPUT)
** (Requested by : Volker Güth)
** -*- changed on Sunday, 05.12.93 01:47:36 by Kai Iske. LogMessage :
** - MUIProCalc didn`t handle extremly small values
** (Reported by : Volker Güth)
** -*- changed on Sunday, 05.12.93 01:38:18 by Kai Iske. LogMessage :
** - Default values weren`t set up
** - ACLR and CLR gadget have got menu entries too, now
** (Requested by : Volker Güth)
** - History entries may be copied to clipboard now
** (Requested by : Volker Güth)
** -*- changed on Saturday, 27.11.93 01:01:25 by Kai Iske. LogMessage :
** - Recompiled using SAS 6.50
** -*- changed on Wednesday, 20.10.93 00:24:41 by Kai Iske. LogMessage :
** - Bug in ListView display fixed
** -*- created on Tuesday, 19.10.93 23:41:00 by Kai Iske. LogMessage :
** - You may now tell MCalc to clear the input string after
** hitting RETURN or EXEC.
**
** Revision V1.1
** --------------
** created on Tuesday, 12.10.93 01:50:26 by Kai Iske. LogMessage :
** -*- changed on Sunday, 17.10.93 15:03:10 by Kai Iske. LogMessage :
** - Save and Use gadgets weren`t arranged as proposed
** by the AUISG. (Reported by: Stefan Stuntz)
** - Changed layout of Prefs window a bit
** (Suggested by: Stefan Stuntz)
** -*- changed on Friday, 15.10.93 18:39:50 by Kai Iske. LogMessage :
** - NOT operator didn`t behave as expected ;) It was a simple
** negate... (Reported by : Top on IRC)
** -*- changed on Thursday, 14.10.93 18:01:32 by Kai Iske. LogMessage :
** - Hex-Values may be entered using 'C'-Style now (e.g. 0xff)
** -*- changed on Thursday, 14.10.93 00:34:55 by Kai Iske. LogMessage :
** - One can use the faktorian '!' behind numbers now, too.
** (Suggested by : Top on IRC)
** -*- changed on Thursday, 14.10.93 00:28:52 by Kai Iske. LogMessage :
** - One could accidentially change the ordering of the
** functions and input-gadgets groups by using
** 'No Functions' and 'No Input' (reported by: Top on IRC)
** -*- created on Tuesday, 12.10.93 01:50:26 by Kai Iske. LogMessage :
** - Order of Input and Ouput gadgets (String + ListView) may be
** set now, ie. the input string may show up underneith the
** ListView and vice versa (Requested by Dirk Federlein)
**
** Revision V1.0
** --------------
** created on Saturday, 02.10.93 02:16:34 by Kai Iske. LogMessage :
** --- Initial release ---
**
*********************************************************************************/
#define REVISION "1.4"
#define REVDATE "18.08.94"
#define REVTIME "17:35:24"
#define AUTHOR "Kai Iske"
#define VERNUM 1
#define REVNUM 4
#ifndef MCALC_H
#define MCALC_H
/**********************************************************************/
/* Parser-Prototypes */
/**********************************************************************/
int yyparse(void);
int yyerror(char *s);
ULONG make_ulong(double OldVal);
double calc_fak(double Fak);
double calc_angle(double Value);
BOOL check_angle(double Value, int Mode);
/**********************************************************************/
/* Scanner-Prototypes */
/**********************************************************************/
int yylex(void);
void yyrestart(FILE *File);
void count(void);
int calc_int_value(char *s);
int calc_hex_value(char *s, int leng);
int calc_bin_value(char *s);
int calc_oct_value(char *s);
int calc_dbl_value(char *s);
/**********************************************************************/
/* Error-Codes for Scanner/Parser */
/**********************************************************************/
#define ERR_PARSE 1
#define ERR_UNKNOWN_CHR 2
#define ERR_DIVBY0 3
#define ERR_OVERFLOW 4
/**********************************************************************/
/* My constant definitions */
/**********************************************************************/
#define Pi ((double) 3.141592653589793)
/**********************************************************************/
/* Assembler-Prototypes */
/**********************************************************************/
ULONG __asm MyASL(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyASR(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyLSL(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyLSR(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyROL(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyROR(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyXOR(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyNAND(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyNOR(register __d0 ULONG In, register __d1 ULONG Out);
ULONG __asm MyNXOR(register __d0 ULONG In, register __d1 ULONG Out);
APTR __asm DoCreatePool(register __d0 ULONG, register __d1 ULONG, register __d2 ULONG);
void __asm DoDeletePool(register __a0 APTR);
APTR __asm AllocVecPool(register __a0 APTR, register __d0 ULONG);
void __asm FreeVecPool(register __a0 APTR, register __a1 APTR);
/************