ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/portio.c
(Generate patch)

Comparing ray/src/common/portio.c (file contents):
Revision 2.16 by greg, Thu Mar 3 22:06:18 2016 UTC vs.
Revision 2.18 by greg, Tue Mar 15 13:57:09 2016 UTC

# 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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines