diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-04-25 02:29:42 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-04-25 09:30:14 +0000 |
commit | 29eba5308f919e00557d8383df03f5673f3d592f (patch) | |
tree | ab4e8facf85df553344f566731f24e2fd9c6a416 /epan/charsets.h | |
parent | 0d787afcb4249fd8656a9ae7d99a83ebd5207de7 (diff) |
Add a get_ebcdic_string() routine, similar to other get_XXX_string() routines.
Use it in epan/tvbuff.c.
Do some other cleanups while we're at it.
Change-Id: I7aed37a568373b896aacfd23f986d445b58b77b7
Reviewed-on: https://code.wireshark.org/review/1342
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/charsets.h')
-rw-r--r-- | epan/charsets.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/epan/charsets.h b/epan/charsets.h index 7a8210442b..ed0d275a53 100644 --- a/epan/charsets.h +++ b/epan/charsets.h @@ -28,15 +28,6 @@ extern "C" { #endif /* __cplusplus */ -#if 0 -void ASCII_to_EBCDIC(guint8 *buf, guint bytes); -guint8 ASCII_to_EBCDIC1(guint8 c); -#endif -WS_DLL_PUBLIC -void EBCDIC_to_ASCII(guint8 *buf, guint bytes); -WS_DLL_PUBLIC -guint8 EBCDIC_to_ASCII1(guint8 c); - /* * Translation tables that map the upper 128 code points in single-byte * "extended ASCII" character encodings to Unicode code points in the @@ -103,6 +94,18 @@ WS_DLL_PUBLIC guint8 * get_ascii_7bits_string(wmem_allocator_t *scope, const guint8 *ptr, const gint bit_offset, gint no_of_chars); +WS_DLL_PUBLIC guint8 * +get_ebcdic_string(wmem_allocator_t *scope, const guint8 *ptr, gint length); + +#if 0 +void ASCII_to_EBCDIC(guint8 *buf, guint bytes); +guint8 ASCII_to_EBCDIC1(guint8 c); +#endif +WS_DLL_PUBLIC +void EBCDIC_to_ASCII(guint8 *buf, guint bytes); +WS_DLL_PUBLIC +guint8 EBCDIC_to_ASCII1(guint8 c); + #ifdef __cplusplus } #endif /* __cplusplus */ |