# beware of the non-standard stuff for bc and egrep
depend:
for i in ${STD} ${KMEM}; do \
- cc -M ${INCPATH} $$i.c | sed 's/\.o//' | \
+ ${CC} -M ${INCPATH} $$i.c | sed 's/\.o//' | \
awk ' { if ($$1 != prev) \
{ if (rec != "") print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' >> makedep; done
for i in bc egrep; do \
- cc -M ${INCPATH} $$i.y | sed 's/\.o//' | \
+ ${CC} -M ${INCPATH} $$i.y | sed 's/\.o//' | \
awk ' { if ($$1 != prev) \
{ if (rec != "") print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
# DO NOT DELETE THIS LINE -- make depend uses it
-ar11: ar11.c /usr/include/signal.h /usr/include/stdio.h
-ar11: /usr/include/sys/types.h /usr/include/sys/stat.h
-basename: basename.c /usr/include/stdio.h
-cal: cal.c
-cb: cb.c /usr/include/stdio.h
-checkeq: checkeq.c /usr/include/stdio.h
-col: col.c /usr/include/stdio.h
-comm: comm.c /usr/include/stdio.h
-crypt: crypt.c /usr/include/stdio.h
-deroff: deroff.c /usr/include/stdio.h
-fgrep: fgrep.c /usr/include/stdio.h /usr/include/ctype.h
-fgrep: /usr/include/sys/param.h /usr/include/machine/machparam.h
-fgrep: /usr/include/signal.h /usr/include/sys/types.h /usr/include/sys/stat.h
-file: file.c /usr/include/sys/param.h /usr/include/machine/machparam.h
-file: /usr/include/signal.h /usr/include/sys/types.h /usr/include/sys/stat.h
-file: /usr/include/stdio.h /usr/include/ctype.h /usr/include/a.out.h
-file: /usr/include/sys/exec.h
-join: join.c /usr/include/stdio.h
-look: look.c /usr/include/stdio.h /usr/include/ctype.h
-mesg: mesg.c /usr/include/stdio.h /usr/include/sys/types.h
-mesg: /usr/include/sys/stat.h
-ptx: ptx.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/signal.h
-ranlib: ranlib.c /usr/include/sys/types.h /usr/include/ar.h
-ranlib: /usr/include/ranlib.h /usr/include/a.out.h /usr/include/sys/exec.h
-ranlib: /usr/include/stdio.h
-rev: rev.c /usr/include/stdio.h
-sleep: sleep.c
-sort: sort.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/signal.h
-sort: /usr/include/sys/types.h /usr/include/sys/stat.h
-spline: spline.c /usr/include/stdio.h /usr/include/math.h
-split: split.c /usr/include/stdio.h
-sum: sum.c /usr/include/stdio.h
-tabs: tabs.c /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
-tabs: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
-tc: tc.c /usr/include/signal.h /usr/include/stdio.h
-tk: tk.c /usr/include/stdio.h /usr/include/signal.h
-touch: touch.c /usr/include/stdio.h /usr/include/sys/types.h
-touch: /usr/include/sys/stat.h
-tr: tr.c /usr/include/stdio.h
-tsort: tsort.c /usr/include/stdio.h
-tty: tty.c
-uniq: uniq.c /usr/include/stdio.h /usr/include/ctype.h
-units: units.c /usr/include/stdio.h
-iostat: iostat.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/nlist.h
-iostat: /usr/include/signal.h /usr/include/sys/types.h /usr/include/sys/file.h
-iostat: /usr/include/sys/buf.h /usr/include/sys/dk.h
-iostat: /usr/include/vaxuba/ubavar.h /usr/include/vaxmba/mbavar.h
-bc: bc.y /usr/include/stdio.h
-egrep: egrep.y /usr/include/stdio.h /usr/include/sys/types.h
-egrep: /usr/include/sys/stat.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
*p1 = '\0';
}
output:
- puts(p2, stdout);
+ puts(p2);
exit(0);
}
if(lookup(welse) == 1){
gotelse();
if(sflg == 0 || j > 0)string[j++] = c;
- puts();
+ _puts();
sflg = 0;
continue;
}
continue;
case '\n':
if((eflg = lookup(welse)) == 1)gotelse();
- puts();
+ _puts();
printf("\n");
sflg = 1;
if(eflg == 1){
tabs--;
}
string[j++] = c;
- puts();
+ _puts();
getnl();
- puts();
+ _puts();
printf("\n");
tabs++;
sflg = 1;
tabs -= pflg[level];
pflg[level] = 0;
}
- puts();
+ _puts();
tabs--;
ptabs();
if((peek = getch()) == ';'){
}
else printf("%c",c);
getnl();
- puts();
+ _puts();
printf("\n");
sflg = 1;
if(clevel < slevel[level])if(level > 0)level--;
string[j++] = getch();
}
if(cc == '\n'){
- puts();
+ _puts();
sflg = 1;
}
}
continue;
case ';':
string[j++] = c;
- puts();
+ _puts();
if(pflg[level] > 0 && ind[level] == 0){
tabs -= pflg[level];
pflg[level] = 0;
}
getnl();
- puts();
+ _puts();
printf("\n");
sflg = 1;
if(iflev > 0)
}
if(lookup(wds) == 0){
sflg = 0;
- puts();
+ _puts();
}
else{
tabs--;
- puts();
+ _puts();
tabs++;
}
if((peek = getch()) == ';'){
peek = -1;
}
getnl();
- puts();
+ _puts();
printf("\n");
sflg = 1;
continue;
case ')':
paren--;
string[j++] = c;
- puts();
+ _puts();
if(getnl() == 1){
peek = '\n';
if(paren != 0)aflg = 1;
while((cc = getch()) != '\n')string[j++] = cc;
string[j++] = cc;
sflg = 0;
- puts();
+ _puts();
sflg = 1;
continue;
case '(':
goto cont;
}
paren--;
- puts();
+ _puts();
if(getnl() == 1){
peek = '\n';
pflg[level]++;
continue;
}
if(lookup(wif) == 1){
- puts();
+ _puts();
stabs[clevel][iflev] = tabs;
spflg[clevel][iflev] = pflg[level];
sind[clevel][iflev] = ind[level];
peek = -1;
return(lastchar);
}
-puts(){
+_puts(){
if(j > 0){
if(sflg != 0){
ptabs();
goto beg;
}
if(ch == '\n'){
- puts();
+ _puts();
aflg = 1;
goto beg;
}
return;
break;
case '\n':
- puts();
+ _puts();
sflg = 1;
break;
}
store (lno)
{
- char *malloc();
+ void *malloc();
lno %= PL;
if (page[lno] != 0)
free (page[lno]);
- page[lno] = malloc((unsigned)strlen(lbuff) + 2);
+ page[lno] = (char *)malloc((unsigned)strlen(lbuff) + 2);
if (page[lno] == 0) {
fprintf (stderr, "%s: no storage\n", pgmname);
exit (2);
--- /dev/null
+ar11.c ar.h
+ar11.c net.h
+ar11.c sys/inode.h
+ar11.c sys/select.h
+col.c netns/spidp.h
+deroff.c ctype.h
+deroff.c vax/reg.h
+tabs.c netns/spidp.h
+tabs.c vax/reg.h
+tk.c netns/spidp.h
#define C1get ( (c=getc(infile)) == EOF ? eof() : c)
#ifdef DEBUG
-# define C _C()
-# define C1 _C1()
+# define C _Cget()
+# define C1 _C1get()
#else not DEBUG
# define C Cget
# define C1 C1get
*/
#define COMX 1 /* goto comx */
#define COM 2 /* goto com */
+
+/*
+ * Macro processing
+ *
+ * Macro table definitions
+ */
+typedef int pacmac; /* compressed macro name */
+int argconcat = 0; /* concat arguments together (-me only) */
+
+#define tomac(c1, c2) ((((c1) & 0xFF) << 8) | ((c2) & 0xFF))
+#define frommac(src, c1, c2) (((c1)=((src)>>8)&0xFF),((c2) =(src)&0xFF))
+
+struct mactab{
+ int condition;
+ pacmac macname;
+ int (*func)();
+};
+extern struct mactab troffmactab[];
+extern struct mactab ppmactab[];
+extern struct mactab msmactab[];
+extern struct mactab mmmactab[];
+extern struct mactab memactab[];
+extern struct mactab manmactab[];
+/*
+ * macro table initialization
+ */
+#define M(cond, c1, c2, func) {cond, tomac(c1, c2), func}
\f
main(ac, av)
int ac;
}
/*ARGSUSED*/
-textline(str, const)
+textline(str, _const)
char *str;
- int const;
+ int _const;
{
if (wordflag) {
msputwords(0);
}
}
-regline(pfunc, const)
+regline(pfunc, _const)
int (*pfunc)();
- int const;
+ int _const;
{
line[0] = c;
lp = line;
*lp = '\0';
if(line[0] != '\0')
- (*pfunc)(line, const);
+ (*pfunc)(line, _const);
}
macro()
}
#ifdef DEBUG
-_C1()
+_C1get()
{
return(C1get);
}
-_C()
+_Cget()
{
return(Cget);
}
#endif DEBUG
\f
-/*
- * Macro processing
- *
- * Macro table definitions
- */
-#define reg register
-typedef int pacmac; /* compressed macro name */
-int argconcat = 0; /* concat arguments together (-me only) */
-
-#define tomac(c1, c2) ((((c1) & 0xFF) << 8) | ((c2) & 0xFF))
-#define frommac(src, c1, c2) (((c1)=((src)>>8)&0xFF),((c2) =(src)&0xFF))
-
-struct mactab{
- int condition;
- pacmac macname;
- int (*func)();
-};
-struct mactab troffmactab[];
-struct mactab ppmactab[];
-struct mactab msmactab[];
-struct mactab mmmactab[];
-struct mactab memactab[];
-struct mactab manmactab[];
-/*
- * macro table initialization
- */
-#define M(cond, c1, c2, func) {cond, tomac(c1, c2), func}
-
/*
* Put out a macro line, using ms and mm conventions.
*/
-msputmac(s, const)
+msputmac(s, _const)
register char *s;
- int const;
+ int _const;
{
register char *t;
register found;
for(t = s ; *t!=' ' && *t!='\t' && *t!='\0' ; ++t)
;
if(*s == '\"')s++;
- if(t>s+const && chars[ s[0] ]==LETTER && chars[ s[1] ]==LETTER){
+ if(t>s+_const && chars[ s[0] ]==LETTER && chars[ s[1] ]==LETTER){
while(s < t)
if(*s == '\"')s++;
else
#define SKIPBLANK(cp) while(*cp == ' ' || *cp == '\t') { cp++; }
#define SKIPNONBLANK(cp) while(*cp !=' ' && *cp !='\cp' && *cp !='\0') { cp++; }
-meputmac(cp, const)
- reg char *cp;
- int const;
+meputmac(cp, _const)
+ register char *cp;
+ int _const;
{
- reg char *np;
+ register char *np;
int found;
int argno;
int last;
/*
* Determine if the argument merits being printed
*
- * const is the cut off point below which something
+ * _const is the cut off point below which something
* is not a word.
*/
- if ( ( (np - cp) > const)
+ if ( ( (np - cp) > _const)
&& ( inquote
|| (chars[cp[0]] == LETTER)) ){
for (cp = cp; cp < np; cp++){
comline()
{
- reg int c1;
- reg int c2;
+ register int c1;
+ register int c2;
pacmac c12;
- reg int mid;
+ register int mid;
int lb, ub;
int hit;
static int tabsize = 0;
static struct mactab *mactab = (struct mactab *)0;
- reg struct mactab *mp;
+ register struct mactab *mp;
if (mactab == 0){
buildtab(&mactab, &tabsize);
}
int sizetab(mp)
- reg struct mactab *mp;
+ register struct mactab *mp;
{
- reg int i;
+ register int i;
i = 0;
if (mp){
for (; mp->macname; mp++, i++)
}
struct mactab *macfill(dst, src)
- reg struct mactab *dst;
- reg struct mactab *src;
+ register struct mactab *dst;
+ register struct mactab *src;
{
if (src) {
while(src->macname){
/* join F1 F2 on stuff */
#include <stdio.h>
+#include <varargs.h>
#define F1 0
#define F2 1
#define NFLD 20 /* max field per line */
}
}
-error(s1, s2, s3, s4, s5)
-char *s1;
+error(fmt, va_alist)
+char *fmt;
+va_dcl
{
+ va_list argp;
+
fprintf(stderr, "join: ");
- fprintf(stderr, s1, s2, s3, s4, s5);
+ va_start(argp);
+ vfprintf(stderr, fmt, argp);
+ va_end(argp);
fprintf(stderr, "\n");
exit(1);
}
return;
case -1:
case 0:
- puts(entry,stdout);
+ puts(entry);
break;
case 1:
case 2:
switch(compare(key,word)) {
case -1:
case 0:
- puts(entry,stdout);
+ puts(entry);
continue;
}
break;
char **argv;
{
register a;
- extern char end[1];
+ /*extern char end[1];*/
char *ep;
char *arg;
struct field *p, *q;
}
safeoutfil();
- ep = end + MEM;
+ /*ep = end + MEM;*/
lspace = (int *)sbrk(0);
+ ep = (char *)lspace + MEM;
while((int)brk(ep) == -1)
ep -= 512;
#ifndef vax
--lines;
text -= len;
}
- qsort((char **)lspace, lp);
+ _qsort((char **)lspace, lp);
if(done == 0 || nfiles != eargc)
newfile();
else
do {
i = j;
- qsort((char **)ibuf, (char **)(ibuf+i));
+ _qsort((char **)ibuf, (char **)(ibuf+i));
l = 0;
while(i--) {
cp = ibuf[i]->l;
#define qsexc(p,q) t= *p;*p= *q;*q=t
#define qstexc(p,q,r) t= *p;*p= *r;*r= *q;*q=t
-qsort(a,l)
+_qsort(a,l)
char **a, **l;
{
register char **i, **j;
if(uflg)
for(k=lp+1; k<=hp;) **k++ = '\0';
if(lp-a >= l-hp) {
- qsort(hp+1, l);
+ _qsort(hp+1, l);
l = lp;
} else {
- qsort(a, lp);
+ _qsort(a, lp);
a = hp+1;
}
goto start;
main(argc,argv)
char *argv[];{
- extern char *malloc();
+ extern void *malloc();
int i;
x.lbf = x.ubf = y.lbf = y.ubf = 0;
x.lb = INF;
case 'p':
ap = &argv[0][2];
dfact = 72;
- if(i = atoi())pl = i/3;
+ if(i = _atoi())pl = i/3;
continue;
case 't':
tflag++;
case 's':
ap = &argv[0][2];
dfact = 1;
- pgskip = atoi();
+ pgskip = _atoi();
continue;
default:
dfact = 1;
ap = &argv[0][1];
- if(i = atoi())mpy = i;
- if(i = atoi())div = i;
+ if(i = _atoi())mpy = i;
+ if(i = _atoi())div = i;
continue;
}
}
case 's':
ap = &buf[1];
dfact = 1;
- pgskip = atoi() + 1;
+ pgskip = _atoi() + 1;
goto next;
default:
fputs("?\n", stderr);
alpha = 0;
return;
}
-atoi()
+_atoi()
{
register i, j, acc;
int field, digits;
struct nodelist *pred;
};
-struct nodelist *index();
+struct nodelist *_index();
struct nodelist *findloop();
struct nodelist *mark();
char *malloc();
break;
if(x!=2)
error("odd data",empty);
- i = index(precedes);
- j = index(follows);
+ i = _index(precedes);
+ j = _index(follows);
if(i==j||present(i,j))
continue;
t = (struct predlist *)malloc(sizeof(struct predlist));
/* turn a string into a node pointer
*/
struct nodelist *
-index(s)
+_index(s)
register char *s;
{
register struct nodelist *i;