aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/jpg
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-25 21:36:03 +0000
committerrsc <devnull@localhost>2004-04-25 21:36:03 +0000
commit840bb96866d382d3e4771ca8e81e1cb9aa37986c (patch)
treecf16586e3b049c26a5348e1097b274e3c715f1c8 /src/cmd/jpg
parentecdecae370ea13343bbfab0f9aa712c83c2fdfb0 (diff)
downloadplan9port-840bb96866d382d3e4771ca8e81e1cb9aa37986c.tar.gz
plan9port-840bb96866d382d3e4771ca8e81e1cb9aa37986c.tar.bz2
plan9port-840bb96866d382d3e4771ca8e81e1cb9aa37986c.zip
stupid sun
Diffstat (limited to 'src/cmd/jpg')
-rw-r--r--src/cmd/jpg/ico.c8
-rw-r--r--src/cmd/jpg/readppm.c10
-rw-r--r--src/cmd/jpg/writegif.c7
3 files changed, 14 insertions, 11 deletions
diff --git a/src/cmd/jpg/ico.c b/src/cmd/jpg/ico.c
index 31806afb..3a275e65 100644
--- a/src/cmd/jpg/ico.c
+++ b/src/cmd/jpg/ico.c
@@ -273,9 +273,9 @@ enum
};
char *menu3str[] = {
- [Mimage] "write image",
- [Mmask] "write mask",
- [Mexit] "exit",
+ "write image",
+ "write mask",
+ "exit",
0,
};
@@ -469,7 +469,7 @@ main(int argc, char **argv)
if(Bgetheader(&in, &h) < 0)
sysfatal("reading header: %r");
- initdraw(nil, nil, "ico");
+ initdraw(0, nil, "ico");
background = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, (128<<24)|(128<<16)|(128<<8)|0xFF);
einit(Emouse|Ekeyboard);
diff --git a/src/cmd/jpg/readppm.c b/src/cmd/jpg/readppm.c
index 28b7f4ea..d9b54293 100644
--- a/src/cmd/jpg/readppm.c
+++ b/src/cmd/jpg/readppm.c
@@ -151,12 +151,12 @@ struct Pix {
};
static Pix pix[] = {
- { '1', 1, Bgetdecimalbit, 1, CY, 1, nil }, /* portable bitmap */
+ { '1', 1, Bgetdecimalbit, 1, CY, 1, 0 }, /* portable bitmap */
{ '4', 1, Bgetbit, 1, CY, 1, Bflushbit }, /* raw portable bitmap */
- { '2', 0, Bgetint, 1, CY, 0, nil }, /* portable greymap */
- { '5', 0, Bgetc, 1, CY, 0, nil }, /* raw portable greymap */
- { '3', 0, Bgetint, 3, CRGB, 0, nil }, /* portable pixmap */
- { '6', 0, Bgetc, 3, CRGB, 0, nil }, /* raw portable pixmap */
+ { '2', 0, Bgetint, 1, CY, 0, 0 }, /* portable greymap */
+ { '5', 0, Bgetc, 1, CY, 0, 0 }, /* raw portable greymap */
+ { '3', 0, Bgetint, 3, CRGB, 0, 0 }, /* portable pixmap */
+ { '6', 0, Bgetc, 3, CRGB, 0, 0 }, /* raw portable pixmap */
{ 0 },
};
diff --git a/src/cmd/jpg/writegif.c b/src/cmd/jpg/writegif.c
index 16402ef8..4bb018b3 100644
--- a/src/cmd/jpg/writegif.c
+++ b/src/cmd/jpg/writegif.c
@@ -52,8 +52,11 @@ startgif0(Biobuf *fd, ulong chan, Rectangle r, int depth, int loopcount)
{
int i;
- for(i=0; i<nelem(tbl); i++)
- tbl[i] = (Entry){i, -1, i, nil};
+ for(i=0; i<nelem(tbl); i++){
+ tbl[i].index = i;
+ tbl[i].prefix = -1;
+ tbl[i].exten = i;
+ }
switch(chan){
case GREY1: