Magellan Linux

Diff of /trunk/mkinitrd-magellan/klibc/usr/dash/shell.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1121 by niro, Sat Sep 1 22:45:15 2007 UTC revision 1122 by niro, Wed Aug 18 21:11:40 2010 UTC
# Line 92  extern char nullstr[1]; /* null string Line 92  extern char nullstr[1]; /* null string
92    
93  #define likely(x) __builtin_expect(!!(x),1)  #define likely(x) __builtin_expect(!!(x),1)
94  #define unlikely(x) __builtin_expect(!!(x),0)  #define unlikely(x) __builtin_expect(!!(x),0)
95    
96    /*
97     * Hack to calculate maximum length.
98     * (length * 8 - 1) * log10(2) + 1 + 1 + 12
99     * The second 1 is for the minus sign and the 12 is a safety margin.
100     */
101    static inline int max_int_length(int bytes)
102    {
103     return (bytes * 8 - 1) * 0.30102999566398119521 + 14;
104    }

Legend:
Removed from v.1121  
changed lines
  Added in v.1122