diff options
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | include/fcall.h | 2 | ||||
| -rw-r--r-- | include/version.h | 2 | ||||
| -rw-r--r-- | libmemdraw/draw.c | 6 |
4 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,7 @@ +20070227 + /include/fcall.h: ensure unsigned promotion to counter ansi sign-extending rules for GBIT64 +20070220 + add 0x92 as chip ID for ether91c111.c 20070217 repair /appl/lib/libc.b and /appl/lib/libc0.b strncmp implementations (used only by c2l output) [inferno-os issue 9] /emu/port/devip.c, get socket fd on reopen of ctl diff --git a/include/fcall.h b/include/fcall.h index 915fec41..1302c9a1 100644 --- a/include/fcall.h +++ b/include/fcall.h @@ -64,7 +64,7 @@ struct Fcall #define GBIT8(p) ((p)[0]) #define GBIT16(p) ((p)[0]|((p)[1]<<8)) #define GBIT32(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24))) -#define GBIT64(p) ((vlong)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\ +#define GBIT64(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\ ((vlong)((p)[4]|((p)[5]<<8)|((p)[6]<<16)|((p)[7]<<24)) << 32)) #define PBIT8(p,v) (p)[0]=(v) diff --git a/include/version.h b/include/version.h index ea9166bd..62d5bc0c 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define VERSION "Fourth Edition (20070217)" +#define VERSION "Fourth Edition (20070227)" diff --git a/libmemdraw/draw.c b/libmemdraw/draw.c index 8fe88bce..2559f904 100644 --- a/libmemdraw/draw.c +++ b/libmemdraw/draw.c @@ -2494,6 +2494,7 @@ memfillcolor(Memimage *i, ulong val) { ulong bits; int d, y; + uchar p[4]; if(val == DNofill) return; @@ -2507,6 +2508,11 @@ memfillcolor(Memimage *i, ulong val) default: /* 1, 2, 4, 8, 16, 32 */ for(d=i->depth; d<32; d*=2) bits = (bits << d) | bits; + p[0] = bits; /* make little endian */ + p[1] = bits>>8; + p[2] = bits>>16; + p[3] = bits>>24; + bits = *(u32int*)p; memsetl(wordaddr(i, i->r.min), bits, i->width*Dy(i->r)); break; } |
