Correct an incoherency with arith and label types.
authorManoel Trapier <godzil@godzil.net>
Tue, 19 Mar 2013 14:05:37 +0000 (15:05 +0100)
committerManoël Trapier <godzil@MacBook-Pro.home>
Wed, 24 Jun 2015 22:41:47 +0000 (23:41 +0100)
lang/cem/cemcom.ansi/arith.h
lang/cem/cemcom/arith.h
lang/cem/cpp.ansi/arith.h
modules/h/em_arith.h
modules/h/em_code.h
modules/h/em_label.h
modules/src/flt_arith/flt_arith.h

index b51e7d5..ba4f431 100644 (file)
@@ -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 */
 
index 6cdc09b..184b6f3 100644 (file)
@@ -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 */
index 96dc435..852e906 100644 (file)
@@ -20,6 +20,6 @@
 
 #include <stdint.h>
 
-#define        arith   int32_t                         /* dummy */
+typedef int32_t arith; /* dummy */
 
 #endif /* LANG_CEM_CPP_ANSI_ARITH_H */
index 3387e27..b1d2916 100644 (file)
@@ -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 */
\ No newline at end of file
index cb2773e..04a5150 100644 (file)
@@ -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"
index 1782c27..5f748c6 100644 (file)
@@ -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 */
\ No newline at end of file
index bd6ecb1..9ab6cf1 100644 (file)
@@ -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 */