Changeset 7258c6a in buchla-68k for libsm/strtol.c


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libsm/strtol.c

    r0292fbb r7258c6a  
    1212#define MBASE   ('z' - 'a' + 1 + 10)
    1313
    14 long strtol(char *str, char **ptr, int base)
     14int32_t strtol(int8_t *str, int8_t **ptr, int16_t base)
    1515{
    16         register long val;
    17         register int c;
    18         int xx, neg = 0;
     16        register int32_t val;
     17        register int16_t c;
     18        int16_t xx, neg = 0;
    1919
    20         if (ptr != (char **)0)
     20        if (ptr != (int8_t **)0)
    2121                *ptr = str; /* in case no number is formed */
    2222
     
    6262                val = base * val - xx;
    6363
    64         if (ptr != (char **)0)
     64        if (ptr != (int8_t **)0)
    6565                *ptr = str;
    6666
Note: See TracChangeset for help on using the changeset viewer.