The -A and --ansi switches are gone, together with the __STRICT_ANSI__
predefined macro. Instead there is now a command line option --standard that allows to set c89, c99 or cc65 as language standard. The compiler defines a macro __CC65_STD__ that is one of __CC65_STD_C89__, __CC65_STD_C99__ or __CC65_STD_CC65__ depending on the command line option. Default is cc65 (all extensions) as before. git-svn-id: svn://svn.cc65.org/cc65/trunk@3133 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2000 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.de */
|
||||
/* (C) 1998-2004 Ullrich von Bassewitz */
|
||||
/* R<EFBFBD>merstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -70,10 +70,12 @@ int __fastcall__ ispunct (int c);
|
||||
int __fastcall__ isspace (int c);
|
||||
int __fastcall__ isupper (int c);
|
||||
int __fastcall__ isxdigit (int c);
|
||||
#if __CC65_STD__ >= __CC65_STD_C99__
|
||||
int __fastcall__ isblank (int c); /* New in C99 */
|
||||
#endif
|
||||
|
||||
int __fastcall__ toupper (int c); /* Always external */
|
||||
int __fastcall__ tolower (int c); /* Always external */
|
||||
int __fastcall__ toupper (int c); /* Always external */
|
||||
int __fastcall__ tolower (int c); /* Always external */
|
||||
|
||||
|
||||
|
||||
@@ -88,32 +90,34 @@ int __fastcall__ tolower (int c); /* Always external */
|
||||
|
||||
#define isalnum(c) (__AX__ = (c), \
|
||||
__asm__ ("tay"), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_ALNUM), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_ALNUM), \
|
||||
__AX__)
|
||||
|
||||
#define isalpha(c) (__AX__ = (c), \
|
||||
__asm__ ("tay"), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_ALPHA), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_ALPHA), \
|
||||
__AX__)
|
||||
|
||||
#if __CC65_STD__ >= __CC65_STD_C99__
|
||||
#define isblank(c) (__AX__ = (c), \
|
||||
__asm__ ("tay"), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_SPACE_TAB), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_SPACE_TAB), \
|
||||
__AX__)
|
||||
#endif
|
||||
|
||||
#define iscntrl(c) (__AX__ = (c), \
|
||||
__asm__ ("tay"), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_CNTRL), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_CNTRL), \
|
||||
__AX__)
|
||||
|
||||
#define isdigit(c) (__AX__ = (c), \
|
||||
__asm__ ("tay"), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_DIGIT), \
|
||||
__asm__ ("lda %v,y", _ctype), \
|
||||
__asm__ ("and #%b", _CT_DIGIT), \
|
||||
__AX__)
|
||||
|
||||
#define isgraph(c) (__AX__ = (c), \
|
||||
|
||||
Reference in New Issue
Block a user