mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2024-11-27 10:00:17 -06:00
28 lines
549 B
C
28 lines
549 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
// Copyright (C) 2020 Martin Whitaker.
|
|
|
|
#include "ctype.h"
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Public Functions
|
|
//------------------------------------------------------------------------------
|
|
|
|
int toupper(int c)
|
|
{
|
|
if (c >= 'a' && c <= 'z') {
|
|
return c + 'A' -'a';
|
|
} else {
|
|
return c;
|
|
}
|
|
}
|
|
|
|
int isdigit(int c)
|
|
{
|
|
return c >= '0' && c <= '9';
|
|
}
|
|
|
|
int isxdigit(int c)
|
|
{
|
|
return isdigit(c) || (toupper(c) >= 'A' && toupper(c) <= 'F');
|
|
}
|