home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / new / util / misc / mcalc / source / mcalc.h < prev    next >
C/C++ Source or Header  |  1994-08-18  |  11KB  |  296 lines

  1. /*
  2. Auto:        smake MCalc
  3. */
  4.  
  5.  
  6. /* $Revision Header built automatically *************** (do not edit) ************
  7. **
  8. ** © Copyright by GuntherSoft
  9. **
  10. ** File             : SnakeSYS:CPrgs/MUICalc/MCalc.h
  11. ** Created on       : Saturday, 02.10.93 02:16:34
  12. ** Created by       : Kai Iske
  13. ** Current revision : V1.4
  14. **
  15. **
  16. ** Purpose
  17. ** -------
  18. **   - Header-File for MCalc
  19. **
  20. ** Revision V1.4
  21. ** --------------
  22. ** created on Thursday, 17.03.94 20:09:05  by  Kai Iske.   LogMessage :
  23. **  -*-  changed on Donnerstag, 18.08.94 17:35:24  by  Kai Iske.   LogMessage :
  24. **   - MCalc didn`t even care about Percent calculations
  25. **  -*-  changed on Sonntag, 07.08.94 20:30:27  by  Kai Iske.   LogMessage :
  26. **   - atan() wasn`t definied for some ranges (somehow)
  27. **  -*-  changed on Sonntag, 07.08.94 20:17:13  by  Kai Iske.   LogMessage :
  28. **   - The InputString will be default object now
  29. **  -*-  created on Thursday, 17.03.94 20:09:05  by  Kai Iske.   LogMessage :
  30. **   - Recompiled with Scanner generated by flex 2.4.6
  31. **
  32. ** Revision V1.3
  33. ** --------------
  34. ** created on Friday, 11.02.94 23:34:08  by  Kai Iske.   LogMessage :
  35. **  -*-  changed on Friday, 11.02.94 23:35:32  by  Kai Iske.   LogMessage :
  36. **   - One couldn`t use 1e3 for scientific notation of 1000. You
  37. **     had to write 1.0e3. Changed
  38. **     (Reported by : Henry Norman)
  39. **   - No more error lines will be copied from History
  40. **     (Requested by : Stefan Stuntz)
  41. **  -*-  created on Friday, 11.02.94 23:34:08  by  Kai Iske.   LogMessage :
  42. **   - "Radiant" was wrong. Changed. Why didn`t anybody tell me.
  43. **     (Reported by : Henry Norman)
  44. **   - Chose wrong case for mathematical "e".
  45. **     (Reported by : Henry Norman)
  46. **
  47. ** Revision V1.2
  48. ** --------------
  49. ** created on Tuesday, 19.10.93 23:41:00  by  Kai Iske.   LogMessage :
  50. **  -*-  changed on Wednesday, 08.12.93 23:48:31  by  Kai Iske.   LogMessage :
  51. **   - Default number of history lines increased
  52. **     (Requested by : Stefan Stuntz)
  53. **  -*-  changed on Sunday, 05.12.93 22:30:41  by  Kai Iske.   LogMessage :
  54. **   - No checks were made on the ENTRY argument to an ARexx
  55. **     function
  56. **  -*-  changed on Sunday, 05.12.93 18:13:56  by  Kai Iske.   LogMessage :
  57. **   - For calculations via ARexx one can set the type, size, sign
  58. **     and angle flags seperately, now
  59. **  -*-  changed on Sunday, 05.12.93 17:50:09  by  Kai Iske.   LogMessage :
  60. **   - Improved error handling from within ARexx commands a bit
  61. **  -*-  changed on Sunday, 05.12.93 17:46:35  by  Kai Iske.   LogMessage :
  62. **   - MUIProCalc may output TeX style mathematical expressions
  63. **     when using the ARexx commands. Additionally there is another
  64. **     option to convert expressions to TeX format.
  65. **     (Requested by : Volker Güth)
  66. **  -*-  changed on Sunday, 05.12.93 16:47:59  by  Kai Iske.   LogMessage :
  67. **   - Added more ARexx functions to the default ones
  68. **     (CALC, GETINPUT, GETOUTPUT)
  69. **     (Requested by : Volker Güth)
  70. **  -*-  changed on Sunday, 05.12.93 01:47:36  by  Kai Iske.   LogMessage :
  71. **   - MUIProCalc didn`t handle extremly small values
  72. **     (Reported by : Volker Güth)
  73. **  -*-  changed on Sunday, 05.12.93 01:38:18  by  Kai Iske.   LogMessage :
  74. **   - Default values weren`t set up
  75. **   - ACLR and CLR gadget have got menu entries too, now
  76. **     (Requested by : Volker Güth)
  77. **   - History entries may be copied to clipboard now
  78. **     (Requested by : Volker Güth)
  79. **  -*-  changed on Saturday, 27.11.93 01:01:25  by  Kai Iske.   LogMessage :
  80. **   - Recompiled using SAS 6.50
  81. **  -*-  changed on Wednesday, 20.10.93 00:24:41  by  Kai Iske.   LogMessage :
  82. **   - Bug in ListView display fixed
  83. **  -*-  created on Tuesday, 19.10.93 23:41:00  by  Kai Iske.   LogMessage :
  84. **   - You may now tell MCalc to clear the input string after
  85. **     hitting RETURN or EXEC.
  86. **
  87. ** Revision V1.1
  88. ** --------------
  89. ** created on Tuesday, 12.10.93 01:50:26  by  Kai Iske.   LogMessage :
  90. **  -*-  changed on Sunday, 17.10.93 15:03:10  by  Kai Iske.   LogMessage :
  91. **   - Save and Use gadgets weren`t arranged as proposed
  92. **     by the AUISG. (Reported by: Stefan Stuntz)
  93. **   - Changed layout of Prefs window a bit
  94. **     (Suggested by: Stefan Stuntz)
  95. **  -*-  changed on Friday, 15.10.93 18:39:50  by  Kai Iske.   LogMessage :
  96. **   - NOT operator didn`t behave as expected ;) It was a simple
  97. **     negate... (Reported by : Top on IRC)
  98. **  -*-  changed on Thursday, 14.10.93 18:01:32  by  Kai Iske.   LogMessage :
  99. **   - Hex-Values may be entered using 'C'-Style now (e.g. 0xff)
  100. **  -*-  changed on Thursday, 14.10.93 00:34:55  by  Kai Iske.   LogMessage :
  101. **   - One can use the faktorian '!' behind numbers now, too.
  102. **     (Suggested by : Top on IRC)
  103. **  -*-  changed on Thursday, 14.10.93 00:28:52  by  Kai Iske.   LogMessage :
  104. **   - One could accidentially change the ordering of the
  105. **     functions and input-gadgets groups by using
  106. **     'No Functions' and 'No Input' (reported by: Top on IRC)
  107. **  -*-  created on Tuesday, 12.10.93 01:50:26  by  Kai Iske.   LogMessage :
  108. **   - Order of Input and Ouput gadgets (String + ListView) may be
  109. **     set now, ie. the input string may show up underneith the
  110. **     ListView and vice versa (Requested by Dirk Federlein)
  111. **
  112. ** Revision V1.0
  113. ** --------------
  114. ** created on Saturday, 02.10.93 02:16:34  by  Kai Iske.   LogMessage :
  115. **     --- Initial release ---
  116. **
  117. *********************************************************************************/
  118. #define REVISION "1.4"
  119. #define REVDATE  "18.08.94"
  120. #define REVTIME  "17:35:24"
  121. #define AUTHOR   "Kai Iske"
  122. #define VERNUM   1
  123. #define REVNUM   4
  124.  
  125.  
  126. #ifndef        MCALC_H
  127. #define        MCALC_H
  128.  
  129.  
  130.  
  131. /**********************************************************************/
  132. /*                         Parser-Prototypes                          */
  133. /**********************************************************************/
  134. int        yyparse(void);
  135. int        yyerror(char *s);
  136. ULONG        make_ulong(double OldVal);
  137. double        calc_fak(double Fak);
  138. double        calc_angle(double Value);
  139. BOOL        check_angle(double Value, int Mode);
  140.  
  141.  
  142.  
  143. /**********************************************************************/
  144. /*                         Scanner-Prototypes                         */
  145. /**********************************************************************/
  146. int    yylex(void);
  147. void    yyrestart(FILE *File);
  148. void    count(void);
  149. int    calc_int_value(char *s);
  150. int    calc_hex_value(char *s, int leng);
  151. int    calc_bin_value(char *s);
  152. int    calc_oct_value(char *s);
  153. int    calc_dbl_value(char *s);
  154.  
  155.  
  156.  
  157. /**********************************************************************/
  158. /*                   Error-Codes for Scanner/Parser                   */
  159. /**********************************************************************/
  160. #define    ERR_PARSE    1
  161. #define    ERR_UNKNOWN_CHR    2
  162. #define    ERR_DIVBY0    3
  163. #define    ERR_OVERFLOW    4
  164.  
  165.  
  166.  
  167.  
  168. /**********************************************************************/
  169. /*                      My constant definitions                       */
  170. /**********************************************************************/
  171. #define Pi      ((double) 3.141592653589793)
  172.  
  173.  
  174.  
  175.  
  176. /**********************************************************************/
  177. /*                        Assembler-Prototypes                        */
  178. /**********************************************************************/
  179. ULONG    __asm MyASL(register __d0 ULONG In, register __d1 ULONG Out);
  180. ULONG    __asm MyASR(register __d0 ULONG In, register __d1 ULONG Out);
  181. ULONG    __asm MyLSL(register __d0 ULONG In, register __d1 ULONG Out);
  182. ULONG    __asm MyLSR(register __d0 ULONG In, register __d1 ULONG Out);
  183. ULONG    __asm MyROL(register __d0 ULONG In, register __d1 ULONG Out);
  184. ULONG    __asm MyROR(register __d0 ULONG In, register __d1 ULONG Out);
  185. ULONG    __asm MyXOR(register __d0 ULONG In, register __d1 ULONG Out);
  186. ULONG    __asm MyNAND(register __d0 ULONG In, register __d1 ULONG Out);
  187. ULONG    __asm MyNOR(register __d0 ULONG In, register __d1 ULONG Out);
  188. ULONG    __asm MyNXOR(register __d0 ULONG In, register __d1 ULONG Out);
  189. APTR    __asm DoCreatePool(register __d0 ULONG, register __d1 ULONG, register __d2 ULONG);
  190. void    __asm DoDeletePool(register __a0 APTR);
  191. APTR    __asm AllocVecPool(register __a0 APTR, register __d0 ULONG);
  192. void    __asm FreeVecPool(register __a0 APTR, register __a1 APTR);
  193.  
  194.  
  195.  
  196. /************