Ignore:
Timestamp:
Apr 10, 2003, 12:28:07 PM (22 years ago)
Author:
sandervl
Message:

PF: MSVCRT update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/msvcrt/scanf.h

    r9633 r10005  
    3434#define _CHAR_ char
    3535#define _EOF_ MSVCRT_EOF
    36 #define _ISSPACE_(c) isspace(c)
    37 #define _ISDIGIT_(c) isdigit(c)
     36#define _ISSPACE_(c) MSVCRT_isspace(c)
     37#define _ISDIGIT_(c) MSVCRT_isdigit(c)
    3838#define _CONVERT_(c) c /*** FIXME ***/
    3939#define _CHAR2DIGIT_(c, base) char2digit((c), (base))
     
    4141
    4242#ifdef CONSOLE
    43 #define _GETC_(file) _getch()
    44 #define _UNGETC_(nch, file) _ungetch(nch)
    45 #define _FUNCTION_ _cscanf(const _CHAR_ *format, ...)
     43#define _GETC_(file) MSVCRT__getch()
     44#define _UNGETC_(nch, file) MSVCRT__ungetch(nch)
     45#define _FUNCTION_ MSVCRT__cscanf(const _CHAR_ *format, ...)
    4646#else
    4747#ifdef STRING
     
    115115            int w_prefix = 0;
    116116            int prefix_finished = 0;
    117             /* int I64_prefix = 0; */
     117            int I64_prefix = 0;
    118118            format++;
    119119            /* look for leading asterisk, which means 'suppress assignment of
     
    139139                    if (*(format + 1) == '6' &&
    140140                        *(format + 2) == '4') {
    141                         /* I64_prefix = 1; */
     141                        I64_prefix = 1;
    142142                        format += 2;
    143143                        FIXME("I64 prefix currently not implemented in fscanf/fwscanf");
     
    222222#define _SET_NUMBER_(type) *va_arg(ap, type*) = negative ? -cur : cur
    223223                        if (number_signed) {
    224                             if (l_prefix) _SET_NUMBER_(long int);
     224                            if (I64_prefix)  _SET_NUMBER_(long long);
     225                            else if (l_prefix) _SET_NUMBER_(long int);
    225226                            else if (h_prefix) _SET_NUMBER_(short int);
    226227                            else _SET_NUMBER_(int);
     
    230231                                negative = 0;
    231232                            }
    232                             if (l_prefix) _SET_NUMBER_(unsigned long int);
     233                            if (I64_prefix)  _SET_NUMBER_(long long);
     234                            else if (l_prefix) _SET_NUMBER_(unsigned long int);
    233235                            else if (h_prefix)
    234236                                _SET_NUMBER_(unsigned short int);
Note: See TracChangeset for help on using the changeset viewer.