Added lintlib, minor fixes

This commit is contained in:
ceriel 1987-05-18 13:34:06 +00:00
parent 32a436bab4
commit b14dd671b5
5 changed files with 26 additions and 12 deletions

View file

@ -3,7 +3,8 @@ MODULES = $(EMHOME)/modules
HDIR = $(MODULES)/h
EMHDIR = $(EMHOME)/h
INCLUDES = -I$(HDIR) -I$(EMHDIR)
CFLAGS = -O $(INCLUDES) -DPRIVATE=static -DEXPORT=
DEFINES = -DPRIVATE=static -DEXPORT=
CFLAGS = -O $(INCLUDES) $(DEFINES)
INSTALL = $(MODULES)/install
COMPARE = $(MODULES)/compare
@ -11,10 +12,18 @@ TARGETS = libread_emk.a\
libread_emkV.a\
libread_emeV.a
ESRCFILES = read_em.c\
mkcalls.c\
EM_vars.c
KSRCFILES = read_em.c\
mkcalls.c\
EM_vars.c
SRCFILES = em_comp.h\
read_em.c\
reade.c\
readk.c\
readk.c \
mkcalls.c\
EM_vars.c
@ -84,3 +93,8 @@ C_mnem: m_C_mnem argtype
C_mnem_narg: m_C_mnem_na argtype
sh m_C_mnem_na > C_mnem_narg
lintlib: C_mnem C_mnem_narg
lint $(INCLUDES) $(DEFINES) -DCOMPACT -DCHECKING -Cread_emkV $(KSRCFILES)
lint $(INCLUDES) $(DEFINES) -DCHECKING -Cread_emeV $(ESRCFILES)
mv llib-lread_emeV.ln llib-lread_emkV.ln $(MODULES)/lib

View file

@ -308,7 +308,7 @@ EM_dopseudo(opcode, args)
break;
default:
EM_error = "Illegal argument type";
return 0;
return;
}
break;
case ps_rom:
@ -344,7 +344,7 @@ EM_dopseudo(opcode, args)
break;
default:
EM_error = "Illegal argument type";
return 0;
return;
}
break;
default:

View file

@ -80,9 +80,11 @@ static struct string *i_strings; /* Index of last one used */
static struct e_args *argp; /* Indicates arguments yet to be
delivered
*/
#ifdef COMPACT
static arith strleft; /* count # of chars left to read
in a string
*/
#endif
static int state; /* What state are we in? */
#define CON 01 /* Reading a CON */
@ -122,6 +124,7 @@ xerror(s)
if (!EM_error) EM_error = s;
}
#ifdef COMPACT
PRIVATE
xfatal(s)
char *s;
@ -130,7 +133,6 @@ xfatal(s)
if (!EM_error) EM_error = s;
}
#ifdef COMPACT
#include "readk.c"
#else not COMPACT
#include "reade.c"
@ -176,8 +178,6 @@ EXPORT
EM_close()
{
register struct string *pstr;
if (fd != STDIN) {
sys_close(fd);
fd = STDIN;

View file

@ -621,7 +621,7 @@ getlabel(c, p)
PRIVATE struct e_instr *
gethead()
{
register int c, i;
register int c;
register struct e_instr *p = &emhead;
argnum = 1;

View file

@ -71,7 +71,7 @@ getarg(typset)
ap->em_noff = 0;
ap->em_argtype = nof_ptyp;
#ifdef CHECKING
if (ap->em_dlb < 0 && !EM_error) {
if (ap->em_dlb > 32767 && !EM_error) {
EM_error = "Illegal data label";
break;
}
@ -87,7 +87,7 @@ getarg(typset)
ap->em_ilb = get16();
ap->em_argtype = ilb_ptyp;
#ifdef CHECKING
if (ap->em_ilb < 0 && !EM_error) {
if (ap->em_ilb > 32767 && !EM_error) {
EM_error = "Illegal instruction label";
break;
}
@ -326,7 +326,7 @@ gethead()
p->em_type = EM_DEFILB;
p->em_deflb = get16();
#ifdef CHECKING
if (p->em_deflb < 0 && !EM_error) {
if (p->em_deflb > 32767 && !EM_error) {
EM_error = "Illegal instruction label definition";
}
#endif CHECKING
@ -341,7 +341,7 @@ gethead()
p->em_type = EM_DEFDLB;
p->em_deflb = get16();
#ifdef CHECKING
if (p->em_deflb < 0 && !EM_error) {
if (p->em_deflb > 32767 && !EM_error) {
EM_error = "Illegal data label definition";
}
#endif CHECKING