ANSI C conversion of code and adapt man page accordingly.

This commit is contained in:
carl 2019-05-11 00:53:52 +08:00
parent 5bb20bdb9e
commit dc269e57d8
2 changed files with 22 additions and 69 deletions

View file

@ -19,12 +19,7 @@ void C_ms_stb_cst(char* s, int e1, int e2, arith e3)
C_mes_end(); C_mes_end();
} }
void void C_ms_stb_dlb(char *s, int e1, int e2, label l, arith off)
C_ms_stb_dlb(s, e1, e2, l, off)
char *s;
int e1, e2;
label l;
arith off;
{ {
C_mes_begin(ms_stb); C_mes_begin(ms_stb);
if (s) C_scon(s, (arith) (strlen(s)+1)); if (s) C_scon(s, (arith) (strlen(s)+1));
@ -34,12 +29,7 @@ C_ms_stb_dlb(s, e1, e2, l, off)
C_mes_end(); C_mes_end();
} }
void void C_ms_stb_dnam(char *s, int e1, int e2, char *l, arith off)
C_ms_stb_dnam(s, e1, e2, l, off)
char *s;
int e1, e2;
char *l;
arith off;
{ {
C_mes_begin(ms_stb); C_mes_begin(ms_stb);
if (s) C_scon(s, (arith) (strlen(s)+1)); if (s) C_scon(s, (arith) (strlen(s)+1));
@ -49,11 +39,7 @@ C_ms_stb_dnam(s, e1, e2, l, off)
C_mes_end(); C_mes_end();
} }
void void C_ms_stb_ilb(char *s, int e1, int e2, label l)
C_ms_stb_ilb(s, e1, e2, l)
char *s;
int e1, e2;
label l;
{ {
C_mes_begin(ms_stb); C_mes_begin(ms_stb);
if (s) C_scon(s, (arith) (strlen(s)+1)); if (s) C_scon(s, (arith) (strlen(s)+1));
@ -63,11 +49,7 @@ C_ms_stb_ilb(s, e1, e2, l)
C_mes_end(); C_mes_end();
} }
void void C_ms_stb_pnam(char *s, int e1, int e2, char *p)
C_ms_stb_pnam(s, e1, e2, p)
char *s;
int e1, e2;
char *p;
{ {
C_mes_begin(ms_stb); C_mes_begin(ms_stb);
if (s) C_scon(s, (arith) (strlen(s)+1)); if (s) C_scon(s, (arith) (strlen(s)+1));

View file

@ -6,68 +6,39 @@ em_mes \- EM-message generating routines
.nf .nf
.B #include <em.h> .B #include <em.h>
.PP .PP
.B void C_ms_err() .B void C_ms_err(void)
.PP .PP
.B void C_ms_opt() .B void C_ms_opt(void)
.PP .PP
.B void C_ms_emx(wsiz, psiz) .B void C_ms_emx(arith wsiz, arith psiz)
.B arith wsiz, psiz;
.PP .PP
.B #include <em_reg.h> .B #include <em_reg.h>
.B void C_ms_reg(offs, siz, class, prior) .B void C_ms_reg(arith offs, arith siz, int class, int prior)
.B arith offs, siz;
.B int class, prior;
.PP .PP
.B void C_ms_src(nlines, filnam) .B void C_ms_src(int nlines, char *filnam)
.B int nlines;
.B char *filnam;
.PP .PP
.B void C_ms_flt() .B void C_ms_flt(void)
.PP .PP
.B void C_ms_com(str) .B void C_ms_com(char *str)
.B char *str;
.PP .PP
.B void C_ms_par(nparams) .B void C_ms_par(arith nparams)
.B arith nparams;
.PP .PP
.B #include <em_ego.h> .B #include <em_ego.h>
.B void C_ms_ego(hint, offs, siz, regno) .B void C_ms_ego(int hint, arith offs, arith siz, int regno)
.B int hint, regno;
.B arith offs, siz;
.PP .PP
.B void C_ms_gto() .B void C_ms_gto(void)
.PP .PP
.B void C_ms_stb_cst(s, e1, e2, e3) .B void C_ms_stb_cst(char *s, int e1, int e2, arith e3)
.B char *s;
.B int e1, e2;
.B arith e3;
.PP .PP
.B void C_ms_stb_dlb(s, e1, e2, l, off) .B void C_ms_stb_dlb(char *s, int e1, int e2, label l, arith off)
.B char *s;
.B int e1, e2;
.B label l;
.B arith off;
.PP .PP
.B void C_ms_stb_dnam(s, e1, e2, l, off) .B void C_ms_stb_dnam(char *s, int e1, int e2, char *l, arith off)
.B char *s;
.B int e1, e2;
.B char *l;
.B arith off;
.PP .PP
.B void C_ms_stb_ilb(s, e1, e2, l) .B void C_ms_stb_ilb(char *s, int e1, int e2, label l)
.B char *s;
.B int e1, e2;
.B label l;
.PP .PP
.B void C_ms_stb_pnam(s, e1, e2, p) .B void C_ms_stb_pnam(char *s, int e1, int e2, char *p)
.B char *s;
.B int e1, e2;
.B char *p;
.PP .PP
.B void C_ms_std(s, e1, l) .B void C_ms_std(char* s, int e1, int l)
.B char *s;
.B int e1;
.B int l;
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
This set of routines forms a front end for the This set of routines forms a front end for the
@ -108,7 +79,7 @@ can be used to indicate that a local variable, having offset
and size (in bytes) and size (in bytes)
.IR siz , .IR siz ,
may be stored in a register. may be stored in a register.
.I Class .I class
indicates the use of the variable. indicates the use of the variable.
The following classes are allowed (the names are defined in em_reg.h): The following classes are allowed (the names are defined in em_reg.h):
.RS .RS
@ -122,7 +93,7 @@ pointer variable
floating point variable floating point variable
.LP .LP
.RE .RE
.I Prior .I prior
is taken to be the priority of the variable; higher numbers indicate is taken to be the priority of the variable; higher numbers indicate
better candidates. better candidates.
.PP .PP