From: ceriel Date: Fri, 3 Jul 1987 10:35:55 +0000 (+0000) Subject: The em_argtype sometimes was not set right X-Git-Tag: release-5-5~4039 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=10caf5c7857cc365789f651d857312b32cf80789;p=ack.git The em_argtype sometimes was not set right --- diff --git a/modules/src/read_em/read_em.3 b/modules/src/read_em/read_em.3 index 5955338fe..e614c13a4 100644 --- a/modules/src/read_em/read_em.3 +++ b/modules/src/read_em/read_em.3 @@ -139,8 +139,7 @@ Common definitions are \fBlong\fR for \fBarith\fR and \fBunsigned int\fR for The \fIe_instr\fR structure consists of the fields \fIem_type\fR, containing the type of this \fIe_instr\fR, \fIem_opcode\fR, containing the opcode of an instruction, -\fIem_arg\fR, containing a possible argument, -and two other fields for special purposes explained later. +and \fIem_arg\fR, containing a possible argument. .PP The possible values of \fIem_type\fR, defined in , are summarized below: diff --git a/modules/src/read_em/reade.c b/modules/src/read_em/reade.c index feedf74fa..144c47203 100644 --- a/modules/src/read_em/reade.c +++ b/modules/src/read_em/reade.c @@ -601,6 +601,7 @@ getlabel(c, p) switch(p->em_argtype) { case cst_ptyp: p->em_type = EM_DEFILB; + p->em_argtype = ilb_ptyp; p->em_ilb = p->em_cst; break; case sof_ptyp: diff --git a/modules/src/read_em/readk.c b/modules/src/read_em/readk.c index dfb02258c..df4e813ed 100644 --- a/modules/src/read_em/readk.c +++ b/modules/src/read_em/readk.c @@ -307,6 +307,7 @@ gethead(p) if (i < sp_filb0+sp_nilb0 && i >= sp_filb0) { /* Instruction label */ p->em_type = EM_DEFILB; + p->em_argtype = ilb_ptyp; p->em_ilb = i - sp_filb0; return; } @@ -314,11 +315,13 @@ gethead(p) switch(i) { case sp_ilb1: /* Instruction label */ p->em_type = EM_DEFILB; + p->em_argtype = ilb_ptyp; p->em_ilb = getbyte(); break; case sp_ilb2: /* Instruction label */ p->em_type = EM_DEFILB; + p->em_argtype = ilb_ptyp; p->em_ilb = get16(); #ifdef CHECKING if (p->em_ilb > 32767 && !EM_error) { @@ -329,11 +332,13 @@ gethead(p) case sp_dlb1: /* Numeric data label */ p->em_type = EM_DEFDLB; + p->em_argtype = nof_ptyp; p->em_dlb = getbyte(); break; case sp_dlb2: /* Numeric data label */ p->em_type = EM_DEFDLB; + p->em_argtype = nof_ptyp; p->em_dlb = get16(); #ifdef CHECKING if (p->em_dlb > 32767 && !EM_error) { @@ -347,6 +352,7 @@ gethead(p) struct string *s; p->em_type = EM_DEFDNAM; + p->em_argtype = sof_ptyp; if (!(s = getstring(1))) { p->em_dnam = ""; }