From 5bcc83d4ace983ff5f3c194e9085172f06dd922f Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 15 Jan 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-01-15 --- bitsy/devpenmouse.c | 2 +- port/devcons.c | 7 ++----- port/devdraw.c | 3 +-- port/error.h | 1 - 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/bitsy/devpenmouse.c b/bitsy/devpenmouse.c index 0007978457f27432be513b501df62a0c00715a1d..ee14dcfa81e7d43fb226207b2a02e7fe92ab60b3 100644 --- a/bitsy/devpenmouse.c +++ b/bitsy/devpenmouse.c @@ -365,7 +365,7 @@ penmousewrite(Chan *c, void *va, long n, vlong) || (!isdigit(*field[2]) && *field[2] != '-') || (!isdigit(*field[3]) && *field[3] != '-') || (!isdigit(*field[4]) && *field[4] != '-')) - error(Ectlsyntax); + error("bad syntax in control file message"); calibration.scalex = strtol(field[1], nil, 0); calibration.scaley = strtol(field[2], nil, 0); calibration.transx = strtol(field[3], nil, 0); diff --git a/port/devcons.c b/port/devcons.c index 3c617d26d30c8f792bc173fc505a517eb8f3c563..4aef29bb95ce6ff91fbf73b70b1add1c4cace536 100644 --- a/port/devcons.c +++ b/port/devcons.c @@ -21,10 +21,9 @@ static struct char line[1024]; /* current input line */ int count; - int repeat; int ctlpoff; - /* someplace to save up characters at interrupt time before dumping them in the q */ + /* a place to save up characters at interrupt time before dumping them in the queue */ Lock lockputc; char istage[512]; char *iw; @@ -314,7 +313,6 @@ echoprintq(char *buf, int n) qiwrite(printq, ebuf, p - ebuf); } - void echo(char *buf, int n) { @@ -393,8 +391,7 @@ echo(char *buf, int n) /* * Called by a uart interrupt for console input. * - * turn '\r' into '\n' before putting it into the queue. we - * can't type runes on alternate consoles, so don't worry about it. + * turn '\r' into '\n' before putting it into the queue. */ int kbdcr2nl(Queue*, int ch) diff --git a/port/devdraw.c b/port/devdraw.c index cb6350a18f37c27eaef959915e01bd09227e6ad1..23bfc67ca7d295eae25d6bbf47312e74142ba95a 100644 --- a/port/devdraw.c +++ b/port/devdraw.c @@ -1363,9 +1363,8 @@ drawmesg(Client *client, void *av, int n) continue; } i = allocmemimage(r, chan); - if(i == 0){ + if(i == 0) error(Edrawmem); - } if(repl) i->flags |= Frepl; i->clipr = clipr; diff --git a/port/error.h b/port/error.h index 9c90b6afe865b306700c377cc527ce5c1eb9bd33..62b513f3571dc08c04ce206aa3c502aa519ae3d1 100644 --- a/port/error.h +++ b/port/error.h @@ -44,4 +44,3 @@ extern char Egreg[]; /* xterm: Error 50, errno 1: Too big */ extern char Ebadspec[]; /* bad attach specifier */ extern char Enoreg[]; /* process has no saved registers */ extern char Enoattach[]; /* mount/attach disallowed */ -extern char Ectlsyntax[]; /* bad syntax in control file messages */