Added ctype-test.
This commit is contained in:
parent
76a7bb252f
commit
780d07a12d
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue