diff options
author | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
commit | a53955d8abd68c604de02cc1e101c66169207fb7 (patch) | |
tree | e51051484f2b073f7b58a1549442bf0657ca2978 /crypto/objects/obj_dat.c | |
parent | 9231f4779677a3cb95a4f8ccebd56432cb914498 (diff) |
Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
Diffstat (limited to 'crypto/objects/obj_dat.c')
-rw-r--r-- | crypto/objects/obj_dat.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 0b24b14446..d56edcdf96 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -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); } |