Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/libbb/xatonum_template.c

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

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 1  Line 1 
1  /*  /*
2     *
3     * Licensed under GPLv2, see file LICENSE in this tarball for details.
4     */
5    /*
6  You need to define the following (example):  You need to define the following (example):
7    
8  #define type long  #define type long
# Line 21  unsigned type FAST_FUNC xstrtou(_range_s Line 25  unsigned type FAST_FUNC xstrtou(_range_s
25   int old_errno;   int old_errno;
26   char *e;   char *e;
27    
28   /* Disallow '-' and any leading whitespace. Make sure we get the   /* Disallow '-' and any leading whitespace. */
29   * actual isspace function rather than a macro implementaion. */   if (*numstr == '-' || *numstr == '+' || isspace(*numstr))
  if (*numstr == '-' || *numstr == '+' || (isspace)(*numstr))  
30   goto inval;   goto inval;
31    
32   /* Since this is a lib function, we're not allowed to reset errno to 0.   /* Since this is a lib function, we're not allowed to reset errno to 0.
# Line 153  type FAST_FUNC xstrto(_range)(const char Line 156  type FAST_FUNC xstrto(_range)(const char
156   return xstrto(_range_sfx)(numstr, base, lower, upper, NULL);   return xstrto(_range_sfx)(numstr, base, lower, upper, NULL);
157  }  }
158    
159    type FAST_FUNC xstrto()(const char *numstr, int base)
160    {
161     return xstrto(_range_sfx)(numstr, base, XSTR_TYPE_MIN, XSTR_TYPE_MAX, NULL);
162    }
163    
164  type FAST_FUNC xato(_range_sfx)(const char *numstr,  type FAST_FUNC xato(_range_sfx)(const char *numstr,
165   type lower,   type lower,
166   type upper,   type upper,

Legend:
Removed from v.983  
changed lines
  Added in v.984