Minor tweaks, no change of function

This commit is contained in:
Robin Stuart 2017-08-07 08:37:02 +01:00
parent 1f503f2aca
commit 50ec72527b
8 changed files with 124 additions and 377 deletions

View file

@ -223,18 +223,15 @@ static void ecc200(unsigned char *binary, const int bytes, const int datablock,
/* Return true (1) if a character is valid in X12 set */
static int isX12(const int source) {
if (source == 13) {
return 1;
}
if (source == 42) {
return 1;
}
if (source == 62) {
return 1;
}
if (source == 32) {
return 1;
switch(source) {
case 13: // CR
case 42: // *
case 62: // >
case 32: // space
return 1;
}
if ((source >= '0') && (source <= '9')) {
return 1;
}