Delinted somewhat (did not work on 2/2 machines)

This commit is contained in:
ceriel 1991-02-18 11:11:04 +00:00
parent af7686cd66
commit cf0cd51810
6 changed files with 13 additions and 5 deletions

View 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);

View 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",

View 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.

View 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

View file

@ -32,6 +32,8 @@
extern int proclevel;
extern char *sprint();
static struct db_str {
unsigned sz;
char *base;

View 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