aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/rc/io.c')
-rw-r--r--src/cmd/rc/io.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/cmd/rc/io.c b/src/cmd/rc/io.c
index 5152627..3e47036 100644
--- a/src/cmd/rc/io.c
+++ b/src/cmd/rc/io.c
@@ -88,7 +88,6 @@ refill(Io *io)
return *io->b++&0xff;
}
-
void
flush(Io *io)
{
@@ -106,14 +105,13 @@ flush(Io *io)
}else{
n = io->b-io->buf;
if(n && write(io->fd, io->buf, n) < 0)
- write(3, "write error\n", 12);
+ write(mapfd(3), "write error\n", 12);
io->b = io->buf;
io->e = io->buf + io->cap;
}
}
-static
void
printchar(Io *io, int c)
{
@@ -123,7 +121,7 @@ printchar(Io *io, int c)
*io->b++=c;
}
-void
+static void
printquote(Io *io, char *s)
{
printchar(io, '\'');
@@ -142,7 +140,7 @@ printstr(Io *io, char *s)
while(*s) printchar(io, *s++);
}
-void
+static void
printword(Io *io, char *s)
{
char *t;
@@ -157,7 +155,7 @@ printword(Io *io, char *s)
printstr(io, s);
}
-void
+static void
printptr(Io *io, void *v)
{
int n;
@@ -170,8 +168,7 @@ printptr(Io *io, void *v)
for(n = 28;n>=0;n-=4) printchar(io, "0123456789ABCDEF"[(p>>n)&0xF]);
}
-static
-void
+static void
printint(Io *io, int n)
{
if(n<0){
@@ -192,8 +189,7 @@ printint(Io *io, int n)
printchar(io, n%10+'0');
}
-static
-void
+static void
printoct(Io *io, unsigned n)
{
if(n>7)
@@ -201,8 +197,7 @@ printoct(Io *io, unsigned n)
printchar(io, (n&7)+'0');
}
-static
-void
+static void
printval(Io *io, Word *a)
{
if(a){
@@ -219,8 +214,7 @@ printval(Io *io, Word *a)
#define C1 t->child[1]
#define C2 t->child[2]
-static
-void
+static void
printtree(Io *io, Tree *t)
{
Tree *c, *nc;