Delinted somewhat (did not work on 2/2 machines)
authorceriel <none@none>
Mon, 18 Feb 1991 11:11:04 +0000 (11:11 +0000)
committerceriel <none@none>
Mon, 18 Feb 1991 11:11:04 +0000 (11:11 +0000)
lang/pc/comp/code.c
lang/pc/comp/def.c
lang/pc/comp/lookup.c
lang/pc/comp/main.c
lang/pc/comp/stab.c
lang/pc/comp/statement.g

index 2e1c41d..fcb61cc 100644 (file)
@@ -32,7 +32,7 @@ routine_label(df)
 {
        df->prc_label = ++data_label;
        C_df_dlb(df->prc_label);
-       C_rom_scon(df->df_idf->id_text, strlen(df->df_idf->id_text) + 1);
+       C_rom_scon(df->df_idf->id_text, (arith)(strlen(df->df_idf->id_text) + 1));
 }
 
 RomString(nd)
@@ -250,7 +250,7 @@ CodeEndBlock(df, StackAdjustment)
                }
                if( tp = ResultType(df->df_type) )      {
                        if( !options['R'] ) {
-                               C_lin(LineNumber);
+                               C_lin((arith)LineNumber);
                                C_lol(df->prc_bool);
                                C_cal("_nfa");
                                C_asp(word_size);
index 532edf2..9d2ad39 100644 (file)
@@ -20,6 +20,7 @@ struct def *
 MkDef(id, scope, kind)
        register struct idf *id;
        register struct scope *scope;
+       long kind;
 {
        /*      Create a new definition structure in scope "scope", with
         *      id "id" and kind "kind".
@@ -44,6 +45,7 @@ struct def *
 define(id, scope, kind)
        register struct idf *id;
        register struct scope *scope;
+       long kind;
 {
        /*      Declare an identifier in a scope, but first check if it
                already has been defined.
@@ -52,7 +54,7 @@ define(id, scope, kind)
        */
        register struct def *df;
 
-       if( df = lookup(id, scope, 0) ) {
+       if( df = lookup(id, scope, 0L) )        {
                if (df->df_kind == D_INUSE) {
                        if( kind != D_INUSE ) {
                            error("\"%s\" already used in this block",
index d0694bd..882971a 100644 (file)
@@ -31,6 +31,7 @@ struct def *
 lookup(id, scope, inuse)
        register struct idf *id;
        struct scope *scope;
+       long    inuse;
 {
        /*      Look up a definition of an identifier in scope "scope".
                Make the "def" list self-organizing.
index 53f18fd..d79efc9 100644 (file)
@@ -116,7 +116,7 @@ Compile(src, dst)
        C_df_dlb(++data_label);
        C_rom_scon(FileName,(arith) strlen(FileName) + 1);
        LLparse();
-       C_ms_src((arith) (LineNumber - 1), FileName);
+       C_ms_src((int)LineNumber - 1, FileName);
        if( fp_used ) C_ms_flt();
        C_close();
 #ifdef DEBUG
index af599d2..2b88d6d 100644 (file)
@@ -32,6 +32,8 @@
 
 extern int     proclevel;
 
+extern char    *sprint();
+
 static struct db_str {
        unsigned        sz;
        char            *base;
index bca23d7..b6c6a3e 100644 (file)
@@ -15,6 +15,7 @@
 #include       "node.h"
 #include       "scope.h"
 #include       "type.h"
+#include       "dbsymtab.h"
 
 int slevel = 0;                /* nesting level of statements */
 }
@@ -47,14 +48,16 @@ Statement
        ]?
                                        { if( !options['L'] )
                                                C_lin((arith) dot.tk_lineno);
+#ifdef DBSYMTAB
                                          if (options['g']) {
                                            static int ms_lineno;
 
                                            if (ms_lineno != dot.tk_lineno) {
-                                               C_ms_std((char *) 0, N_SLINE, dot.tk_lineno);
+                                               C_ms_std((char *) 0, N_SLINE, (int) dot.tk_lineno);
                                                ms_lineno = dot.tk_lineno;
                                            }
                                          }
+#endif /* DBSYMTAB */
                                        }
        [
                SimpleStatement