aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/page
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-04-01 19:24:03 +0000
committerrsc <devnull@localhost>2006-04-01 19:24:03 +0000
commitcbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch)
treee0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/cmd/page
parent226d80b8213821af0cbf092d1507c52b504fd368 (diff)
downloadplan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.gz
plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.bz2
plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.zip
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
Diffstat (limited to 'src/cmd/page')
-rw-r--r--src/cmd/page/gfx.c6
-rw-r--r--src/cmd/page/gs.c8
-rw-r--r--src/cmd/page/nrotate.c4
-rw-r--r--src/cmd/page/rotate.c12
-rw-r--r--src/cmd/page/view.c8
5 files changed, 19 insertions, 19 deletions
diff --git a/src/cmd/page/gfx.c b/src/cmd/page/gfx.c
index 6a947039..9ce6f74c 100644
--- a/src/cmd/page/gfx.c
+++ b/src/cmd/page/gfx.c
@@ -44,7 +44,7 @@ enum {
Ippm,
Ipng,
Iyuv,
- Ibmp,
+ Ibmp
};
/*
@@ -65,7 +65,7 @@ Convert cvt[] = {
[Iccittg4] { "ccitt-g4", "cat %a|rx nslocum /usr/lib/ocr/bin/bcp -M|fb/pcp -tcompressed -l0" },
[Ipng] { "png", "png -9 %a", "png -t9 %a" },
[Iyuv] { "yuv", "yuv -9 %a", "yuv -t9 %a" },
-[Ibmp] { "bmp", "bmp -9 %a", "bmp -t9 %a" },
+[Ibmp] { "bmp", "bmp -9 %a", "bmp -t9 %a" }
};
static Image* convert(Graphic*);
@@ -325,7 +325,7 @@ spawnrc(char *cmd, uchar *stdinbuf, int nstdinbuf)
else
dup(open("/dev/null", OREAD), 0);
dup(pfd[0], 1);
- //dup(pfd[0], 2);
+ /*dup(pfd[0], 2); */
execl("/bin/rc", "rc", "-c", cmd, nil);
wexits("exec");
}
diff --git a/src/cmd/page/gs.c b/src/cmd/page/gs.c
index 2093af56..fd7337ec 100644
--- a/src/cmd/page/gs.c
+++ b/src/cmd/page/gs.c
@@ -305,10 +305,10 @@ waitgs(GSInfo *gs)
uchar buf[1024];
int n;
-// gscmd(gs, "(\\n**bstack\\n) print flush\n");
-// gscmd(gs, "stack flush\n");
-// gscmd(gs, "(**estack\\n) print flush\n");
- gscmd(gs, "(\\n//GO.SYSIN DD\\n) PAGE==\n");
+/* gscmd(gs, "(\\n**bstack\\n) print flush\n"); */
+/* gscmd(gs, "stack flush\n"); */
+/* gscmd(gs, "(**estack\\n) print flush\n"); */
+ gscmd(gs, "(\\n/*GO.SYSIN DD\\n) PAGE==\n"); */
alarm(300*1000);
for(;;) {
diff --git a/src/cmd/page/nrotate.c b/src/cmd/page/nrotate.c
index 65fe33ab..9f6816e2 100644
--- a/src/cmd/page/nrotate.c
+++ b/src/cmd/page/nrotate.c
@@ -23,7 +23,7 @@ int ndraw = 0;
enum {
Xaxis,
- Yaxis,
+ Yaxis
};
static void reverse(Image*, Image*, int);
@@ -229,7 +229,7 @@ swapadjacent(Image *img, Image *tmp, int axis, int imgdim, Image *mask, int mask
/*
* r0 is the lower rectangle, while r1 is the upper one.
*/
- draw(tmp, tmp->r, img, nil,
+ draw(tmp, tmp->r, img, nil
}
void
diff --git a/src/cmd/page/rotate.c b/src/cmd/page/rotate.c
index 9e1c20db..fc13059b 100644
--- a/src/cmd/page/rotate.c
+++ b/src/cmd/page/rotate.c
@@ -22,7 +22,7 @@
int ndraw = 0;
enum {
Xaxis = 0,
- Yaxis = 1,
+ Yaxis = 1
};
Image *mtmp;
@@ -137,7 +137,7 @@ nextmask(Image *mask, int axis, int maskdim)
delta = axis==Xaxis ? Pt(maskdim,0) : Pt(0,maskdim);
drawop(mtmp, mtmp->r, mask, nil, mask->r.min, S);
gendrawop(mask, mask->r, mtmp, delta, mtmp, divpt(delta,-2), S);
-// writefile("mask", mask, maskdim/2);
+/* writefile("mask", mask, maskdim/2); */
return maskdim/2;
}
@@ -153,13 +153,13 @@ shuffle(Image *im, Image *tmp, int axis, int n, Image *mask, int gran,
nn = n - left;
interlace(im, tmp, axis, nn, mask, gran);
-// writefile("interlace", im, gran);
+/* writefile("interlace", im, gran); */
gran = nextmask(mask, axis, gran);
shuffle(im, tmp, axis, n, mask, gran, nn);
-// writefile("shuffle", im, gran);
+/* writefile("shuffle", im, gran); */
moveup(im, tmp, lastnn, nn, n, axis);
-// writefile("move", im, gran);
+/* writefile("move", im, gran); */
}
void
@@ -198,7 +198,7 @@ rot180(Image *im)
}
rmask.max.x = gran;
drawop(mask, rmask, display->opaque, nil, ZP, S);
-// writefile("mask", mask, gran);
+/* writefile("mask", mask, gran); */
shuffle(im, tmp, Xaxis, Dx(im->r), mask, gran, 0);
freeimage(mask);
freeimage(mtmp);
diff --git a/src/cmd/page/view.c b/src/cmd/page/view.c
index 4321f829..1cdb2541 100644
--- a/src/cmd/page/view.c
+++ b/src/cmd/page/view.c
@@ -56,7 +56,7 @@ enum {
Middle = 2,
Right = 4,
- RMenu = 3,
+ RMenu = 3
};
void
@@ -265,7 +265,7 @@ enum{
Del,
Write,
Empty3,
- Exit,
+ Exit
};
void
@@ -866,7 +866,7 @@ redraw(Image *screen)
}
}
border(screen, r, -4000, gray, ZP);
-// flushimage(display, 0);
+/* flushimage(display, 0); */
}
void
@@ -1047,7 +1047,7 @@ newwin(void)
dup(cons, 1);
dup(cons, 2);
close(cons);
-// wctlfd = open("/dev/wctl", OWRITE);
+/* wctlfd = open("/dev/wctl", OWRITE); */
}
Rectangle