Add a new chartype module for character classification. Use the new
function IsDigit in target.c. git-svn-id: svn://svn.cc65.org/cc65/trunk@592 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "chartype.h"
|
||||
#include "target.h"
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ target_t FindTarget (const char* Name)
|
||||
unsigned I;
|
||||
|
||||
/* Check for a numeric target */
|
||||
if (isdigit (*Name)) {
|
||||
if (IsDigit (*Name)) {
|
||||
int Target = atoi (Name);
|
||||
if (Target >= 0 && Target < TGT_COUNT) {
|
||||
return (target_t)Target;
|
||||
|
||||
Reference in New Issue
Block a user