Added ctype-test.

This commit is contained in:
hjp 1997-11-18 10:35:54 +00:00
parent 76a7bb252f
commit 780d07a12d
2 changed files with 22 additions and 1 deletions

View File

@ -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

17
chartab/ctype-test.c Normal file
View File

@ -0,0 +1,17 @@
#include <ctype.h>
#include <locale.h>
#include <limits.h>
#include <stdio.h>
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;
}