added to*() routines: a macro is impossible
This commit is contained in:
parent
a94e7b877a
commit
e701e2e2ec
|
@ -1,4 +1,6 @@
|
||||||
LIST
|
LIST
|
||||||
Makefile
|
Makefile
|
||||||
|
toupper.c
|
||||||
|
tolower.c
|
||||||
char.tab
|
char.tab
|
||||||
genfiles
|
genfiles
|
||||||
|
|
|
@ -4,12 +4,12 @@ clean:
|
||||||
isxdigit.o isascii.o tolower.o toupper.o chartab.o \
|
isxdigit.o isascii.o tolower.o toupper.o chartab.o \
|
||||||
isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c \
|
isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c \
|
||||||
islower.c isprint.c ispunct.c isspace.c isupper.c \
|
islower.c isprint.c ispunct.c isspace.c isupper.c \
|
||||||
isxdigit.c isascii.c tolower.c toupper.c chartab.c \
|
isxdigit.c isascii.c chartab.c \
|
||||||
OLIST
|
OLIST
|
||||||
|
|
||||||
chartab.c: char.tab
|
chartab.c: char.tab
|
||||||
tabgen -fchar.tab > chartab.c
|
tabgen -fchar.tab > chartab.c
|
||||||
|
|
||||||
isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c islower.c isprint.c \
|
isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c islower.c isprint.c \
|
||||||
ispunct.c isspace.c isupper.c isxdigit.c isascii.c tolower.c toupper.c: genfiles
|
ispunct.c isspace.c isupper.c isxdigit.c isascii.c: genfiles
|
||||||
sh genfiles
|
sh genfiles
|
||||||
|
|
|
@ -20,8 +20,6 @@ _U:G-Z
|
||||||
_L:g-z
|
_L:g-z
|
||||||
%T#include <ctype.h>
|
%T#include <ctype.h>
|
||||||
%T
|
%T
|
||||||
%Tint __x;
|
|
||||||
%T
|
|
||||||
%Tchar __ctype[] = {
|
%Tchar __ctype[] = {
|
||||||
%T0,
|
%T0,
|
||||||
%p
|
%p
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
for i in isalnum isalpha iscntrl isdigit isgraph islower isprint \
|
for i in isalnum isalpha iscntrl isdigit isgraph islower isprint \
|
||||||
ispunct isspace isupper isxdigit isascii toupper tolower
|
ispunct isspace isupper isxdigit isascii
|
||||||
do
|
do
|
||||||
sed "s/xxxx/$i/" > $i.c << 'EOF'
|
sed "s/xxxx/$i/" > $i.c << 'EOF'
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
5
lang/cem/libcc.ansi/ctype/tolower.c
Normal file
5
lang/cem/libcc.ansi/ctype/tolower.c
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
int tolower(int c) {
|
||||||
|
return isupper(c) ? c - 'A' + 'a' : c ;
|
||||||
|
}
|
5
lang/cem/libcc.ansi/ctype/toupper.c
Normal file
5
lang/cem/libcc.ansi/ctype/toupper.c
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
int toupper(int c) {
|
||||||
|
return islower(c) ? c - 'a' + 'A' : c ;
|
||||||
|
}
|
Loading…
Reference in a new issue