Bitdefender Hypervisor Memory Introspection
conv.c File Reference
#include "introtypes.h"

Go to the source code of this file.

Macros

#define crt_tolower(c)   ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
 
#define crt_toupper(c)   ((((c) >= 'a') && ((c) <= 'z')) ? ((c) - 'a' + 'A') : (c))
 
#define isalpha(c)   (((((c) >= 'A') && ((c) <= 'Z')) || (((c) >= 'a') && ((c) <= 'z'))) ? 1 : 0)
 
#define isdigit(c)   ((((c) >= '0') && ((c) <= '9')) ? 1 : 0)
 
#define isxdigit(c)
 
#define isprint(c)   (((c) >= ' ' && (c) <= '~') ? 1 : 0)
 
#define isspace(c)   (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\v') || ((c) == '\f') || ((c) == '\r'))
 
#define FL_UNSIGNED   1 /* crt_strtoul called */
 
#define FL_NEG   2 /* negative sign found */
 
#define FL_OVERFLOW   4 /* overflow occurred */
 
#define FL_READDIGIT   8 /* we've read at least one correct digit */
 

Functions

int tolower (int c)
 
int toupper (int c)
 
static UINT32 __cdecl crt_strtoxl (const INT8 *nptr, const INT8 **endptr, INT32 ibase, INT32 flags)
 
static UINT64 __cdecl crt_strtoxll (const INT8 *nptr, const INT8 **endptr, INT32 ibase, INT32 flags)
 
INT32 __cdecl strtol (const INT8 *nptr, INT8 **endptr, INT32 ibase)
 
UINT32 __cdecl strtoul (const INT8 *nptr, INT8 **endptr, INT32 ibase)
 
INT64 __cdecl strtoll (const INT8 *nptr, INT8 **endptr, INT32 ibase)
 
UINT64 __cdecl strtoull (const INT8 *nptr, INT8 **endptr, INT32 ibase)
 

Macro Definition Documentation

◆ crt_tolower

#define crt_tolower (   c)    ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))

Definition at line 10 of file conv.c.

Referenced by tolower().

◆ crt_toupper

#define crt_toupper (   c)    ((((c) >= 'a') && ((c) <= 'z')) ? ((c) - 'a' + 'A') : (c))

Definition at line 11 of file conv.c.

Referenced by toupper().

◆ FL_NEG

#define FL_NEG   2 /* negative sign found */

Definition at line 85 of file conv.c.

Referenced by crt_strtoxl(), and crt_strtoxll().

◆ FL_OVERFLOW

#define FL_OVERFLOW   4 /* overflow occurred */

Definition at line 86 of file conv.c.

Referenced by crt_strtoxl(), and crt_strtoxll().

◆ FL_READDIGIT

#define FL_READDIGIT   8 /* we've read at least one correct digit */

Definition at line 87 of file conv.c.

Referenced by crt_strtoxl(), and crt_strtoxll().

◆ FL_UNSIGNED

#define FL_UNSIGNED   1 /* crt_strtoul called */

Definition at line 84 of file conv.c.

Referenced by crt_strtoxl(), crt_strtoxll(), strtoul(), and strtoull().

◆ isalpha

#define isalpha (   c)    (((((c) >= 'A') && ((c) <= 'Z')) || (((c) >= 'a') && ((c) <= 'z'))) ? 1 : 0)

Definition at line 25 of file conv.c.

Referenced by crt_strtoxl(), and crt_strtoxll().

◆ isdigit

#define isdigit (   c)    ((((c) >= '0') && ((c) <= '9')) ? 1 : 0)

Definition at line 27 of file conv.c.

Referenced by crt_strtoxl(), and crt_strtoxll().

◆ isprint

#define isprint (   c)    (((c) >= ' ' && (c) <= '~') ? 1 : 0)

Definition at line 32 of file conv.c.

◆ isspace

#define isspace (   c)    (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\v') || ((c) == '\f') || ((c) == '\r'))

Definition at line 33 of file conv.c.

◆ isxdigit

#define isxdigit (   c)
Value:
(((((c) >= 'A') && ((c) <= 'F')) || (((c) >= 'a') && \
((c) <= 'f')) || (((c) >= '0') && ((c) <= '9'))) ? 1 : 0)

Definition at line 29 of file conv.c.

Function Documentation

◆ crt_strtoxl()

static UINT32 __cdecl crt_strtoxl ( const INT8 nptr,
const INT8 **  endptr,
INT32  ibase,
INT32  flags 
)
static

TO-DO: reimplement validation _VALIDATE_RETURN(nptr != NULL, EINVAL, 0L); _VALIDATE_RETURN(ibase == 0 || (2 <= ibase && ibase <= 36), EINVAL, 0L);

while ( _isspace_l((INT32)(UINT8)c, _loc_update.GetLocaleT()) )

if ( __ascii_isdigit_l((INT32)(UINT8)c, _loc_update.GetLocaleT()) )

else if ( __ascii_isalpha_l((INT32)(UINT8)c, _loc_update.GetLocaleT()) )

digval = __ascii_toupper(c) - 'A' + 10;

errno = ERANGE;

Definition at line 90 of file conv.c.

Referenced by strtol(), and strtoul().

◆ crt_strtoxll()

static UINT64 __cdecl crt_strtoxll ( const INT8 nptr,
const INT8 **  endptr,
INT32  ibase,
INT32  flags 
)
static

TO-DO: reimplement validation _VALIDATE_RETURN(nptr != NULL, EINVAL, 0L); _VALIDATE_RETURN(ibase == 0 || (2 <= ibase && ibase <= 36), EINVAL, 0L);

while ( _isspace_l((INT32)(UINT8)c, _loc_update.GetLocaleT()) )

if ( __ascii_isdigit_l((INT32)(UINT8)c, _loc_update.GetLocaleT()) )

else if ( __ascii_isalpha_l((INT32)(UINT8)c, _loc_update.GetLocaleT()) )

digval = __ascii_toupper(c) - 'A' + 10;

errno = ERANGE;

Definition at line 255 of file conv.c.

Referenced by strtoll(), and strtoull().

◆ strtol()

INT32 __cdecl strtol ( const INT8 nptr,
INT8 **  endptr,
INT32  ibase 
)

Definition at line 424 of file conv.c.

Referenced by IntLixGuestParseVersion().

◆ strtoll()

INT64 __cdecl strtoll ( const INT8 nptr,
INT8 **  endptr,
INT32  ibase 
)

Definition at line 452 of file conv.c.

◆ strtoul()

UINT32 __cdecl strtoul ( const INT8 nptr,
INT8 **  endptr,
INT32  ibase 
)

◆ strtoull()

◆ tolower()

int tolower ( int  c)

Definition at line 14 of file conv.c.

Referenced by glob_match_utf16(), and glob_match_utf8().

◆ toupper()

int toupper ( int  c)

Definition at line 20 of file conv.c.

Referenced by crt_strtoxl(), and crt_strtoxll().