1
0
Fork 0

builds, too

This commit is contained in:
dtb 2023-12-23 08:51:22 -07:00
parent 89d72e95f2
commit f48a0f6f17
4 changed files with 9 additions and 7 deletions

View File

@ -1,7 +1,7 @@
all: lowercase uppercase
all: lowercase-ascii uppercase-ascii
lowercase: lowercase.c
$(CC) -DLOWERCASE -o lowercase lowercase.c
lowercase-ascii: case.c case-ascii.h
$(CC) -DCONV=TOLOWER -include case-ascii.h -o lowercase-ascii case.c
uppercase: lowercase.c
$(CC) -DUPPERCASE -o uppercase lowercase.c
uppercase-ascii: case.c case-ascii.h
$(CC) -DCONV=TOUPPER -include case-ascii.h -o uppercase-ascii case.c

View File

@ -1,6 +1,7 @@
#define CHARACTER int
#define ISVALID(c) ((c) <= 0x127 /* ASCII DEL; 0b 0111 111 */ && (c) >= 0)
#include <stdio.h> /* getc(3), putc(3) */
#include <stdio.h> /* getc(3), putc(3), EOF */
#define ENDOFFILE EOF
#define GETC getc
#define PUTC putc
#include <ctype.h> /* tolower(3), toupper(3) */

View File

@ -4,6 +4,7 @@
#define ISVALID(c) ((c) <= UCHAR_MAX_VALUE && (c) >= 0)
#define TOLOWER u_tolower
#define TOUPPER u_toupper
#include <unicode/ustdio.h> /* u_fgetc(3), u_fputc(3) */
#include <unicode/ustdio.h> /* u_fgetc(3), u_fputc(3), U_EOF */
#define ENDOFFILE U_EOF
#define GETC u_fgetc
#define PUTC u_fputc