# | Line 13 | Line 13 | static const char RCSid[] = "$Id$"; | |
---|---|---|
13 | ||
14 | #include <math.h> | |
15 | ||
16 | – | #ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ |
17 | – | #undef getc |
18 | – | #undef putc |
19 | – | #define getc getc_unlocked |
20 | – | #define putc putc_unlocked |
21 | – | #endif |
16 | ||
23 | – | |
17 | void | |
18 | putstr( /* write null-terminated string to fp */ | |
19 | char *s, | |
# | Line 40 | Line 33 | putint( /* write a siz-byte integer to fp */ | |
33 | FILE *fp | |
34 | ) | |
35 | { | |
36 | < | while (siz--) |
37 | < | putc((int)(i>>(siz<<3) & 0xff), fp); |
36 | > | siz <<= 3; |
37 | > | while ((siz -= 8) >= 0) |
38 | > | putc((int)(i>>siz & 0xff), fp); |
39 | } | |
40 | ||
41 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |