Use chartype.h instead of ctype.h

git-svn-id: svn://svn.cc65.org/cc65/trunk@593 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-01-05 19:24:47 +00:00
parent 37da7dff98
commit 8add1ad057
13 changed files with 43 additions and 81 deletions

View File

@@ -42,6 +42,7 @@
#include <sys/stat.h>
/* common */
#include "chartype.h"
#include "check.h"
#include "fname.h"
#include "xmalloc.h"
@@ -252,42 +253,10 @@ static void NextChar (void);
static int IsBlank (int C)
/* Return true if the character is a blank or tab */
{
return (C == ' ' || C == '\t');
}
static int IsDigit (int C)
/* Return true if the character is a digit */
{
return isdigit (C);
}
static int IsXDigit (int C)
/* Return true if the character is a hexadecimal digit */
{
return isxdigit (C);
}
static int IsDDigit (int C)
/* Return true if the character is a dual digit */
{
return (C == '0' || C == '1');
}
static int IsIdChar (int C)
/* Return true if the character is a valid character for an identifier */
{
return isalnum (C) ||
return IsAlNum (C) ||
(C == '_') ||
(C == '@' && AtInIdents) ||
(C == '$' && DollarInIdents);
@@ -298,7 +267,7 @@ static int IsIdChar (int C)
static int IsIdStart (int C)
/* Return true if the character may start an identifier */
{
return isalpha (C) || C == '_';
return IsAlpha (C) || C == '_';
}
@@ -692,13 +661,13 @@ Again:
NextChar ();
/* 0 or 1 must follow */
if (!IsDDigit (C)) {
if (!IsBDigit (C)) {
Error (ERR_01_EXPECTED);
}
/* Read the number */
IVal = 0;
while (IsDDigit (C)) {
while (IsBDigit (C)) {
if (IVal & 0x80000000) {
Error (ERR_NUM_OVERFLOW);
IVal = 0;