Skip to content

Commit

Permalink
Unconditionally compile r_magic_from_ebcdic
Browse files Browse the repository at this point in the history
  • Loading branch information
ypsvlq authored and trufae committed May 10, 2022
1 parent cdfaec4 commit 4b22fc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libr/magic/ascmagic.c
Expand Up @@ -37,6 +37,7 @@
* international characters, now subsumed into this file.
*/
#include <r_userconf.h>
#include <r_types.h>

#if !USE_LIB_MAGIC

Expand Down Expand Up @@ -67,7 +68,7 @@ int file_ascmagic(RMagic *ms, const ut8 *buf, size_t nbytes) {
return 0;
size_t i;
ut8 *nbuf = NULL, *utf8_buf = NULL, *utf8_end;
unichar *ubuf = NULL;
unichar *ubuf = NULL;
size_t ulen, mlen;
const struct names *p;
int rv = -1;
Expand Down Expand Up @@ -729,6 +730,8 @@ static int looks_ucs16(const ut8 *buf, size_t nbytes, unichar *ubuf, size_t *ule
#undef I
#undef X

#endif

/*
* This table maps each EBCDIC character to an (8-bit extended) ASCII
* character, as specified in the rationale for the dd(1) command in
Expand Down Expand Up @@ -814,4 +817,3 @@ R_API void r_magic_from_ebcdic(const ut8 *buf, size_t nbytes, ut8 *out) {
out[i] = ebcdic_to_ascii[buf[i]];
}
}
#endif

0 comments on commit 4b22fc5

Please sign in to comment.