From 29eba5308f919e00557d8383df03f5673f3d592f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 25 Apr 2014 02:29:42 -0700 Subject: 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 --- epan/charsets.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'epan/charsets.h') 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 */ -- cgit v1.2.3