Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).

Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
This commit is contained in:
Ulf Möller
1999-06-04 21:35:58 +00:00
parent 9231f47796
commit a53955d8ab
34 changed files with 543 additions and 3 deletions

View File

@@ -497,6 +497,17 @@ char *OBJ_bsearch(char *key, char *base, int num, int size, int (*cmp)())
else
return(p);
}
#ifdef CHARSET_EBCDIC
/* THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and
* I don't have perl (yet), we revert to a *LINEAR* search
* when the object wasn't found in the binary search.
*/
for (i=0; i<num; ++i) {
p= &(base[i*size]);
if ((*cmp)(key,p) == 0)
return p;
}
#endif
return(NULL);
}