From e7f863aa06ec5c30802d5201f68d806c7b253162 Mon Sep 17 00:00:00 2001 From: Gregory Minshall Date: Thu, 13 Nov 1986 00:44:15 -0800 Subject: [PATCH] date and time created 86/11/12 16:44:15 by minshall SCCS-vsn: usr.bin/tn3270/tools/mkdctype/mkdctype.c 1.1 --- .../usr.bin/tn3270/tools/mkdctype/mkdctype.c | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 usr/src/usr.bin/tn3270/tools/mkdctype/mkdctype.c diff --git a/usr/src/usr.bin/tn3270/tools/mkdctype/mkdctype.c b/usr/src/usr.bin/tn3270/tools/mkdctype/mkdctype.c new file mode 100644 index 0000000000..7c7e2c6075 --- /dev/null +++ b/usr/src/usr.bin/tn3270/tools/mkdctype/mkdctype.c @@ -0,0 +1,56 @@ +#include "../ctlr/ebc_disp.h" +#include "ectype.h" + + +extern unsigned char ectype[256]; + + +void +main() +{ + static unsigned char dctype[192] = 0; + int i; + char *orbar; + int type; + + for (i = 0; i < sizeof ectype; i++) { + dctype[ebc_disp[i]] = ectype[i]; + } + + for (i = 0; i < sizeof dctype; i++) { + if ((i%16) == 0) { + printf("/*%02x*/\n", i); + } + printf("\t"); + type = dctype[i]; + orbar = ""; + if (type & E_UPPER) { + printf("E_UPPER"); + orbar = "|"; + } + if (type & E_LOWER) { + printf("%sD_LOWER", orbar); + orbar = "|"; + } + if (type & E_DIGIT) { + printf("%sD_DIGIT", orbar); + orbar = "|"; + } + if (type & E_SPACE) { + printf("%sD_SPACE", orbar); + orbar = "|"; + } + if (type & E_PUNCT) { + printf("%sD_PUNCT", orbar); + orbar = "|"; + } + if (type & E_PRINT) { + printf("%sD_PRINT", orbar); + orbar = "|"; + } + if (orbar[0] == 0) { + printf("0"); + } + printf(",\n"); + } +} -- 2.20.1