SCCS-vsn: old/prof/prof.c 4.5
SCCS-vsn: lib/libplot/aed/open.c 5.2
SCCS-vsn: old/tbl/t..c 4.4
SCCS-vsn: old/tbl/t6.c 4.4
SCCS-vsn: old/tbl/t8.c 4.3
SCCS-vsn: old/tbl/tb.c 4.4
SCCS-vsn: old/tbl/tu.c 4.3
SCCS-vsn: usr.bin/window/lcmd.c 3.29
SCCS-vsn: usr.bin/colcrt/colcrt.c 5.2
SCCS-vsn: usr.bin/tset/tset.c 5.12
SCCS-vsn: usr.bin/error/touch.c 5.4
SCCS-vsn: old/refer/refer/refer5.c 4.9
SCCS-vsn: old/roff/nroff_term/code.aj833 4.2
SCCS-vsn: old/roff/nroff_term/code.itoh 4.2
SCCS-vsn: old/roff/nroff_term/tab37.c 4.2
SCCS-vsn: old/roff/nroff_term/tabepson.c 1.3
SCCS-vsn: old/roff/nroff_term/tabnec25-t.c 4.2
SCCS-vsn: old/roff/nroff_term/tabqume.c 4.2
SCCS-vsn: old/roff/nroff_term/tabqume12.c 4.2
19 files changed:
char dbuf[BUFSIZ]; /* Used to buffer display characters */
struct sgttyb sgttyb; /* Used to save terminal control bits */
char dbuf[BUFSIZ]; /* Used to buffer display characters */
struct sgttyb sgttyb; /* Used to save terminal control bits */
-curx, cury; /* Current screen position */
+int curx, cury; /* Current screen position */
int xbot, ybot; /* Coordinates of screen lower-left corner */
int scale; /* The number of pixels per 2**12 units
* of world coordinates.
int xbot, ybot; /* Coordinates of screen lower-left corner */
int scale; /* The number of pixels per 2**12 units
* of world coordinates.
-static char *sccsid = "@(#)prof.c 4.4 (Berkeley) %G%";
+static char *sccsid = "@(#)prof.c 4.5 (Berkeley) %G%";
#include <a.out.h>
#include <sys/time.h>
#include <a.out.h>
#include <sys/time.h>
-typedef short UNIT; /* unit of profiling */
+typedef unsigned short UNIT; /* unit of profiling */
#define PCFUDGE 11
#define A_OUTNAME "a.out"
#define MON_OUTNAME "mon.out"
#define PCFUDGE 11
#define A_OUTNAME "a.out"
#define MON_OUTNAME "mon.out"
* Each discretized pc sample has
* a count of the number of samples in its range
*/
* Each discretized pc sample has
* a count of the number of samples in its range
*/
highpc = h.highpc - (UNIT *)0;
sampbytes =
stb.st_size - sizeof(struct hdr) - h.ncount*sizeof(struct cnt);
highpc = h.highpc - (UNIT *)0;
sampbytes =
stb.st_size - sizeof(struct hdr) - h.ncount*sizeof(struct cnt);
- nsamples = sampbytes / sizeof (unsigned UNIT);
+ nsamples = sampbytes / sizeof (UNIT);
readsamples()
{
register i;
readsamples()
{
register i;
int totalt;
if (samples == 0) {
int totalt;
if (samples == 0) {
- samples = (unsigned UNIT *)
- calloc(sampbytes, sizeof (unsigned UNIT));
+ samples = (UNIT *)
+ calloc(sampbytes, sizeof (UNIT));
if (samples == 0) {
printf("prof: No room for %d sample pc's\n",
if (samples == 0) {
printf("prof: No room for %d sample pc's\n",
- sampbytes / sizeof (unsigned UNIT));
+ sampbytes / sizeof (UNIT));
done();
}
}
for (i = 0; ; i++) {
done();
}
}
for (i = 0; ; i++) {
- fread(&sample, sizeof (unsigned UNIT), 1, pfile);
+ fread(&sample, sizeof (UNIT), 1, pfile);
if (feof(pfile))
break;
samples[i] += sample;
if (feof(pfile))
break;
samples[i] += sample;
asgnsamples()
{
register j;
asgnsamples()
{
register j;
double time;
unsigned pcl, pch;
register int i;
double time;
unsigned pcl, pch;
register int i;
fwrite(&h, sizeof (struct hdr), 1, sfile);
for (np = nl; np < npe-1; np++) {
if (np->ncall > 0) {
fwrite(&h, sizeof (struct hdr), 1, sfile);
for (np = nl; np < npe-1; np++) {
if (np->ncall > 0) {
- kp.cvalue = np->value * sizeof (unsigned UNIT);
+ kp.cvalue = np->value * sizeof (UNIT);
kp.cncall = np->ncall;
fwrite(&kp, sizeof (struct cnt), 1, sfile);
}
kp.cncall = np->ncall;
fwrite(&kp, sizeof (struct cnt), 1, sfile);
}
kp.cvalue = 0;
kp.cncall = 0;
fwrite(&kp, sizeof (struct cnt), 1, sfile);
kp.cvalue = 0;
kp.cncall = 0;
fwrite(&kp, sizeof (struct cnt), 1, sfile);
- fwrite(samples, sizeof (unsigned UNIT), nsamples, sfile);
+ fwrite(samples, sizeof (UNIT), nsamples, sfile);
scale = (4080.*ransca)/(sampbytes/sizeof(UNIT));
lastsx = 0.0;
for(i = 0; i < nsamples; i++) {
scale = (4080.*ransca)/(sampbytes/sizeof(UNIT));
lastsx = 0.0;
for(i = 0; i < nsamples; i++) {
double tx, ty;
ccnt = samples[i];
time = ccnt;
double tx, ty;
ccnt = samples[i];
time = ccnt;
-static char *sccsid = "@(#)refer5.c 4.8 (Berkeley) %G%";
+static char *sccsid = "@(#)refer5.c 4.9 (Berkeley) %G%";
#endif
#include "refer..c"
#endif
#include "refer..c"
}
if (bare == 0) {
if (!another) {
}
if (bare == 0) {
if (!another) {
- sprintf(t1, "%s%s\%s\n", stline, sig, endline);
+ sprintf(t1, "%s%s%s\n", stline, sig, endline);
if (strlen(t1) > MXSIG)
err("t1 overflow (%d)", MXSIG);
append(t1);
if (strlen(t1) > MXSIG)
err("t1 overflow (%d)", MXSIG);
append(t1);
-/* code.aj833 4.1 83/08/05 */
+/* code.aj833 4.2 88/07/22 */
"\001 ", /*space*/
"\001!", /*!*/
"\001\"", /*"*/
"\001 ", /*space*/
"\001!", /*!*/
"\001\"", /*"*/
"\000\0", /*half narrow space*/
"\001 ", /*unpaddable space*/
"\001\241c\202(\241", /*alpha*/
"\000\0", /*half narrow space*/
"\001 ", /*unpaddable space*/
"\001\241c\202(\241", /*alpha*/
-"\001\200B\242\301\|\202\341", /*beta*/
+"\001\200B\242\301|\202\341", /*beta*/
"\001\200)\201/\241", /*gamma*/
"\001\200o\342<\302", /*delta*/
"\001<\b-", /*epsilon*/
"\001\200)\201/\241", /*gamma*/
"\001\200o\342<\302", /*delta*/
"\001<\b-", /*epsilon*/
-/* code.itoh 4.1 83/08/05 */
+/* code.itoh 4.2 88/07/22 */
/* terminal driver codes for the C.Itoh Prowriter */
/* codetab */
"\001 ", /*space*/
/* terminal driver codes for the C.Itoh Prowriter */
/* codetab */
"\001 ", /*space*/
"\001-", /*3/4 em dash*/
"\001\033X \033Y", /*rule--should properly be up one unit*/
"\001\033\046N\033\044", /*1/4*/
"\001-", /*3/4 em dash*/
"\001\033X \033Y", /*rule--should properly be up one unit*/
"\001\033\046N\033\044", /*1/4*/
-"\001\033\046\M\033\044", /*1/2*/
+"\001\033\046M\033\044", /*1/2*/
"\0033/4", /*3/4*/
"\001-", /*minus*/
"\202fi", /*fi*/
"\0033/4", /*3/4*/
"\001-", /*minus*/
"\202fi", /*fi*/
-/* tab37.c 4.1 83/08/05 */
+/* tab37.c 4.2 88/07/22 */
#define INCH 240
/*
* Model 37 TeleType
#define INCH 240
/*
* Model 37 TeleType
"\000\0", /*narrow sp*/
"\001-", /*hyphen*/
"\001o\b+", /*bullet*/
"\000\0", /*narrow sp*/
"\001-", /*hyphen*/
"\001o\b+", /*bullet*/
"\001-", /*3/4 em*/
"\001_", /*rule*/
"\0031/4", /*1/4*/
"\001-", /*3/4 em*/
"\001_", /*rule*/
"\0031/4", /*1/4*/
"\001", /* narrow sp */
"\001-", /*hyphen*/
"\001\033j\003.\033J\003", /*bullet*/
"\001", /* narrow sp */
"\001-", /*hyphen*/
"\001\033j\003.\033J\003", /*bullet*/
"\001-", /*3/4 em*/
"\001_", /*rule*/
"\0031/4", /*1/4*/
"\001-", /*3/4 em*/
"\001_", /*rule*/
"\0031/4", /*1/4*/
-/* tabnec25-t.c 4.1 86/04/03 */
+/* tabnec25-t.c 4.2 88/07/22 */
#define INCH 240
/*
NEC Spinwriter 7725 and 5525 (Diablo replacements)
#define INCH 240
/*
NEC Spinwriter 7725 and 5525 (Diablo replacements)
"\000\0", /*narrow sp*/
"\001-", /*hyphen*/
"\001O\b+", /*bullet*/
"\000\0", /*narrow sp*/
"\001-", /*hyphen*/
"\001O\b+", /*bullet*/
"\001-", /*3/4 em*/
"\001_", /*rule*/
"\2031/4", /*1/4*/
"\001-", /*3/4 em*/
"\001_", /*rule*/
"\2031/4", /*1/4*/
-/* tabqume.c 4.1 83/08/05 */
+/* tabqume.c 4.2 88/07/22 */
#define INCH 240
/*
* QUME 10 Pitch
#define INCH 240
/*
* QUME 10 Pitch
"\201y", /*y*/
"\201z", /*z*/
"\001[", /*{*/
"\201y", /*y*/
"\201z", /*z*/
"\001[", /*{*/
"\001]", /*}*/
"\000\0", /*~*/
"\000\0", /*narrow sp*/
"\001]", /*}*/
"\000\0", /*~*/
"\000\0", /*narrow sp*/
"\001+", /*equation plus*/
"\001\134", /*registered*/
"\001^", /*copyright*/
"\001+", /*equation plus*/
"\001\134", /*registered*/
"\001^", /*copyright*/
-"\001\033\ ", /*box rule */
+"\001\033 ", /*box rule */
"\001c\b/", /*cent sign*/
"\000\0", /*dbl dagger*/
"\000\0", /*right hand*/
"\000\0", /*left hand*/
"\001*", /*math * */
"\000\0", /*bell system sign*/
"\001c\b/", /*cent sign*/
"\000\0", /*dbl dagger*/
"\000\0", /*right hand*/
"\000\0", /*left hand*/
"\001*", /*math * */
"\000\0", /*bell system sign*/
-"\001\033\ ", /*or (was star)*/
+"\001\033 ", /*or (was star)*/
"\000\0", /*circle*/
"\000\0", /*left top (of big curly)*/
"\000\0", /*left bottom*/
"\000\0", /*circle*/
"\000\0", /*left top (of big curly)*/
"\000\0", /*left bottom*/
-/* tabqume12.c 4.1 83/08/05 */
+/* tabqume12.c 4.2 88/07/22 */
#define INCH 240
/*
* QUME 12 Pitch
#define INCH 240
/*
* QUME 12 Pitch
"\000\0", /*registered*/
"\000\0", /*copyright*/
"\001|", /*box rule */
"\000\0", /*registered*/
"\000\0", /*copyright*/
"\001|", /*box rule */
-"\001\033\ ", /*cent sign*/
+"\001\033 ", /*cent sign*/
"\000\0", /*dbl dagger*/
"\000\0", /*right hand*/
"\000\0", /*left hand*/
"\000\0", /*dbl dagger*/
"\000\0", /*right hand*/
"\000\0", /*left hand*/
/* t..c : external declarations */
/* t..c : external declarations */
extern int left1flg;
extern int rightl;
struct colstr {char *col, *rcol;};
extern int left1flg;
extern int rightl;
struct colstr {char *col, *rcol;};
+/* FIXME: kludge for seeing if somebody stuffed a char into col or rcol. */
+# define tx(a) ((int)(a)>0 && (int)(a)<128)
extern struct colstr *table[];
extern char *cspace, *cstore;
extern char *chspace();
extern struct colstr *table[];
extern char *cspace, *cstore;
extern char *chspace();
-static char sccsid[] = "@(#)t6.c 4.3 %G%";
+static char sccsid[] = "@(#)t6.c 4.4 %G%";
#endif
/* t6.c: compute tab stops */
#endif
/* t6.c: compute tab stops */
-# define tx(a) (a>0 && a<128)
maktab()
{
# define FN(i,c) font[stynum[i]][c]
maktab()
{
# define FN(i,c) font[stynum[i]][c]
case 'a':
acase[icol]=1;
s = table[ilin][icol].col;
case 'a':
acase[icol]=1;
s = table[ilin][icol].col;
- if (s>0 && s<128 && text)
{
if (doubled[icol]==0)
fprintf(tabout, ".nr %d 0\n.nr %d 0\n",S1,S2);
{
if (doubled[icol]==0)
fprintf(tabout, ".nr %d 0\n.nr %d 0\n",S1,S2);
-static char sccsid[] = "@(#)t8.c 4.2 %G%";
+static char sccsid[] = "@(#)t8.c 4.3 %G%";
#endif
/* t8.c: write out one line of output table */
#endif
/* t8.c: write out one line of output table */
{
for(ip=nl; ip<nlin; ip=next(ip))
if (!vspen(s=table[ip][c].col)) break;
{
for(ip=nl; ip<nlin; ip=next(ip))
if (!vspen(s=table[ip][c].col)) break;
fprintf(tabout, ".ne \\n(%c|u+\\n(.Vu\n",s);
continue;
}
fprintf(tabout, ".ne \\n(%c|u+\\n(.Vu\n",s);
continue;
}
-static char sccsid[] = "@(#)tb.c 4.3 %G%";
+static char sccsid[] = "@(#)tb.c 4.4 %G%";
#endif
/* tb.c: check which entries exist, also storage allocation */
#endif
/* tb.c: check which entries exist, also storage allocation */
if (spcount>=MAXVEC)
error("Too many characters in table");
spvecs[spcount++]= pp = calloc(MAXCHS+200,1);
if (spcount>=MAXVEC)
error("Too many characters in table");
spvecs[spcount++]= pp = calloc(MAXCHS+200,1);
error("no space for characters");
return(pp);
}
error("no space for characters");
return(pp);
}
tpvecs[tpcount] = calloc(MAXCHS,1);
}
thisvec = tpvecs[tpcount];
tpvecs[tpcount] = calloc(MAXCHS,1);
}
thisvec = tpvecs[tpcount];
error("no space for vectors");
}
tp=thisvec;
error("no space for vectors");
}
tp=thisvec;
-static char sccsid[] = "@(#)tu.c 4.2 %G%";
+static char sccsid[] = "@(#)tu.c 4.3 %G%";
#endif
/* tu.c: draws horizontal lines */
#endif
/* tu.c: draws horizontal lines */
drawline(i, cl, cr, lintype, noheight, shortl)
{
drawline(i, cl, cr, lintype, noheight, shortl)
{
- char *exhr, *exhl;
- int lcount, ln, linpos, oldpos, nodata, lnch;
+ char *exhr, *exhl, *lnch;
+ int lcount, ln, linpos, oldpos, nodata;
lcount=0;
exhr=exhl= "";
switch(lintype)
lcount=0;
exhr=exhl= "";
switch(lintype)
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)colcrt.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)colcrt.c 5.2 (Berkeley) %G%";
#endif not lint
#include <stdio.h>
#endif not lint
#include <stdio.h>
do {
if (argc > 0) {
close(0);
do {
if (argc > 0) {
close(0);
- if ((f=fopen(argv[0], "r")
-) < 0) {
+ if (!(f = fopen(argv[0], "r"))) {
fflush(stdout);
perror(argv[0]);
exit (1);
fflush(stdout);
perror(argv[0]);
exit (1);
-static char sccsid[] = "@(#)touch.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)touch.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <stdio.h>
#endif /* not lint */
#include <stdio.h>
fclose(tmpfile);
}
if (oktorm == 0){
fclose(tmpfile);
}
if (oktorm == 0){
- fprintf(stderr, "%s: Catastrophe: A copy of \"%s\: was saved in \"%s\"\n",
+ fprintf(stderr, "%s: Catastrophe: A copy of \"%s\": was saved in \"%s\"\n",
processname, o_name, n_name);
exit(1);
}
processname, o_name, n_name);
exit(1);
}
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)tset.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)tset.c 5.12 (Berkeley) %G%";
else
prs(" set to ");
bufp = buf;
else
prs(" set to ");
bufp = buf;
- if (tgetstr("kb", &bufp) > 0 && n == buf[0] && buf[1] == NULL)
+ if (tgetstr("kb", &bufp) && n == buf[0] && buf[1] == NULL)
prs("Backspace\n");
else if (n == 0177)
prs("Delete\n");
prs("Backspace\n");
else if (n == 0177)
prs("Delete\n");
-static char sccsid[] = "@(#)lcmd.c 3.28 (Berkeley) %G%";
+static char sccsid[] = "@(#)lcmd.c 3.29 (Berkeley) %G%";
#endif /* not lint */
#include "defs.h"
#endif /* not lint */
#include "defs.h"
extern struct lcmd_arg arg_unset[];
extern struct lcmd_arg arg_window[];
extern struct lcmd_arg arg_write[];
extern struct lcmd_arg arg_unset[];
extern struct lcmd_arg arg_window[];
extern struct lcmd_arg arg_write[];
-struct lcmd_arg arg_null[] = 0;
+struct lcmd_arg arg_null[];
struct lcmd_tab lcmd_tab[] = {
"alias", 1, l_alias, arg_alias,
struct lcmd_tab lcmd_tab[] = {
"alias", 1, l_alias, arg_alias,