- modified and improved various env. drivers

- implemented string array object
This commit is contained in:
zolliker
2006-06-20 13:29:32 +00:00
parent 8b12033cb2
commit c1bbdb935e
19 changed files with 1495 additions and 499 deletions

View File

@ -30,6 +30,7 @@ char *OxiCorrect(char *str) {
static char buf[32];
char *result = NULL;
if (str[0] == '?') return NULL;
for (i=0; i<=24; i++, str++) {
chr = *str;
if (chr == 0) return result;
@ -39,7 +40,7 @@ char *OxiCorrect(char *str) {
} else {
chr -= 0x40;
}
snprintf(buf, sizeof buf, "%2.2x->%2.2x (%c)", *str, chr, chr);
snprintf(buf, sizeof buf, "%2.2x->%2.2x (%c)", (unsigned char)*str, chr, chr);
*str = chr;
result = buf;
}
@ -69,12 +70,6 @@ int OxiHandler(void *object) {
goto quit;
}
if (iret == 1) {
if (eab->syntax <= -8) {
corr = OxiCorrect(eab->ans);
if (corr) {
ParPrintf(eab, eWarning, "corrected bad response from IGH: %s", corr);
}
}
ParPrintf(eab, -2, "ans: %s", eab->ans);
if (strcmp(eab->ans, "??ck") == 0) {
if (eab->state == EASE_lost) {
@ -96,8 +91,16 @@ int OxiHandler(void *object) {
eab->state = EASE_idle;
goto quit;
} else if (eab->cmd[2] == 'k') { /* ?ck */
} else if (eab->cmd[0] != eab->ans[0]) {
iret = EASE_ILL_ANS;
} else {
if (eab->syntax <= -8) {
corr = OxiCorrect(eab->ans);
if (corr) {
ParPrintf(eab, eWarning, "corrected bad response from IGH: %s", corr);
}
}
if (eab->cmd[0] != eab->ans[0]) {
iret = EASE_ILL_ANS;
}
}
}
if (iret != 1) {