Browse Source

Correct an incoherency with arith and label types.

Manoel Trapier 11 years ago
parent
commit
1ed1edf94d

+ 3 - 1
lang/cem/cemcom.ansi/arith.h

@@ -23,7 +23,9 @@
 
 /*	All preprocessor arithmetic should be done in longs.
 */
-#define	arith	long				/* dummy */
+#include <stdint.h>
+
+typedef int32_t arith; /* dummy */
 
 #endif	/* SPECIAL_ARITHMETICS */
 

+ 3 - 1
lang/cem/cemcom/arith.h

@@ -22,6 +22,8 @@
 #else	/* SPECIAL_ARITHMETICS */
 
 /* not implemented yet */
-#define	arith	int				/* dummy */
+#include <stdint.h>
+
+typedef int32_t arith;		/* dummy */
 
 #endif	/* SPECIAL_ARITHMETICS */

+ 1 - 1
lang/cem/cpp.ansi/arith.h

@@ -20,6 +20,6 @@
 
 #include <stdint.h>
 
-#define	arith	int32_t				/* dummy */
+typedef int32_t arith;	/* dummy */
 
 #endif /* LANG_CEM_CPP_ANSI_ARITH_H */

+ 6 - 1
modules/h/em_arith.h

@@ -3,5 +3,10 @@
  * See the copyright notice in the ACK home directory, in the file "Copyright".
  */
 /* $Id$ */
+#ifndef H_EM_ARITH_H
+#define H_EM_ARITH_H
+#include <stdint.h>
 
-#define arith	long
+typedef int32_t arith;
+
+#endif /* H_EM_ARITH_H */

+ 4 - 6
modules/h/em_code.h

@@ -8,17 +8,14 @@
 
 #include "em_mesX.h"
 #include "ansi.h"
+#include <em_arith.h>
+#include <em_label.h>
 
 void C_flush();
 void C_internal_error();
 void C_putbyte(int c);
 
-#ifndef arith
-#define arith long
-#endif
-#ifndef label
-#define label unsigned int
-#endif
+struct e_instr;
 
 _PROTOTYPE(void C_ms_com, (char *));
 _PROTOTYPE(void C_ms_ego, (int, arith, arith, int));
@@ -36,6 +33,7 @@ _PROTOTYPE(void C_ms_stb_dnam, (char *, int, int, char *, arith));
 _PROTOTYPE(void C_ms_stb_ilb, (char *, int, int, label));
 _PROTOTYPE(void C_ms_stb_pnam, (char *, int, int, char *));
 _PROTOTYPE(void C_ms_std, (char *, int, int));
+_PROTOTYPE(int  C_out, (struct e_instr *p));
 
 #ifdef PEEPHOLE
 #include "em_codeO.h"

+ 2 - 1
modules/h/em_label.h

@@ -5,7 +5,8 @@
 /* $Id$ */
 #ifndef H_LABEL_H
 #define H_LABEL_H
+#include <stdint.h>
 
-#define label unsigned int
+typedef int32_t label;
 
 #endif /* H_LABEL_H */

+ 1 - 4
modules/src/flt_arith/flt_arith.h

@@ -8,10 +8,7 @@
 #define __FLT_INCLUDED__
 
 #include "ansi.h"
-
-#ifndef arith
-#define arith long
-#endif
+#include <em_arith.h>
 
 struct flt_mantissa {
 	long	flt_h_32;	/* high order 32 bits of mantissa */