Unified · Split
| @@ -1,3 +1,7 @@ | ||
| 1 | +20070227 | |
| 2 | + /include/fcall.h: ensure unsigned promotion to counter ansi sign-extending rules for GBIT64 | |
| 3 | +20070220 | |
| 4 | + add 0x92 as chip ID for ether91c111.c | |
| 1 | 5 | 20070217 |
| 2 | 6 | repair /appl/lib/libc.b and /appl/lib/libc0.b strncmp implementations (used only by c2l output) [inferno-os issue 9] |
| 3 | 7 | /emu/port/devip.c, get socket fd on reopen of ctl |
| @@ -64,7 +64,7 @@ struct Fcall · 63 unmodified lines | ||
| 64 | 64 | #define GBIT8(p) ((p)[0]) |
| 65 | 65 | #define GBIT16(p) ((p)[0]|((p)[1]<<8)) |
| 66 | 66 | #define GBIT32(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24))) |
| 67 | −#define GBIT64(p) ((vlong)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\ | |
| 67 | +#define GBIT64(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\ | |
| 68 | 68 | ((vlong)((p)[4]|((p)[5]<<8)|((p)[6]<<16)|((p)[7]<<24)) << 32)) |
| 69 | 69 | |
| 70 | 70 | #define PBIT8(p,v) (p)[0]=(v) |
| @@ -1 +1 @@ | ||
| 1 | −#define VERSION "Fourth Edition (20070217)" | |
| 1 | +#define VERSION "Fourth Edition (20070227)" | |
| @@ -2494,6 +2494,7 @@ memfillcolor(Memimage *i, ulong val) · 2493 unmodified lines | ||
| 2494 | 2494 | { |
| 2495 | 2495 | ulong bits; |
| 2496 | 2496 | int d, y; |
| 2497 | + uchar p[4]; | |
| 2497 | 2498 | |
| 2498 | 2499 | if(val == DNofill) |
| 2499 | 2500 | return; |
| @@ -2507,6 +2508,11 @@ memfillcolor(Memimage *i, ulong val) · 7 unmodified lines | ||
| 2507 | 2508 | default: /* 1, 2, 4, 8, 16, 32 */ |
| 2508 | 2509 | for(d=i->depth; d<32; d*=2) |
| 2509 | 2510 | bits = (bits << d) | bits; |
| 2511 | + p[0] = bits; /* make little endian */ | |
| 2512 | + p[1] = bits>>8; | |
| 2513 | + p[2] = bits>>16; | |
| 2514 | + p[3] = bits>>24; | |
| 2515 | + bits = *(u32int*)p; | |
| 2510 | 2516 | memsetl(wordaddr(i, i->r.min), bits, i->width*Dy(i->r)); |
| 2511 | 2517 | break; |
| 2512 | 2518 | } |