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; +}