From 780d07a12d2483dc33dca533b49a663cc40a86f2 Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 18 Nov 1997 10:35:54 +0000 Subject: [PATCH] Added ctype-test. --- chartab/GNUmakefile | 6 +++++- chartab/ctype-test.c | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 chartab/ctype-test.c diff --git a/chartab/GNUmakefile b/chartab/GNUmakefile index 69563cf..b2f2f63 100644 --- a/chartab/GNUmakefile +++ b/chartab/GNUmakefile @@ -1,5 +1,9 @@ include GNUmakerules + +all: chartab ctype-test + chartab: +ctype-test: clean: rm chartab -install: $(BINDIR)/chartab +install: $(BINDIR)/chartab $(BINDIR)/ctype-test diff --git a/chartab/ctype-test.c b/chartab/ctype-test.c new file mode 100644 index 0000000..224fc97 --- /dev/null +++ b/chartab/ctype-test.c @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int main(int argc, char **argv) { + int i; + + setlocale(LC_ALL, ""); + + for (i = 0; i <= UCHAR_MAX; i++) { + printf ("%2x: ", i); + printf("%c ", isprint(i) ? i : '.'); + printf("\n"); + } + return 0; +}