From 98e594190d793261447257642ad0807590251306 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 18 Aug 2021 09:23:53 +0000 Subject: [PATCH] defined hawk_ipad_bytes_to_oocstr/hawk_oochars_to_ipad_bytes/hawk_oocstr_to_ipad_bytes --- hawk/lib/hawk-skad.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hawk/lib/hawk-skad.h b/hawk/lib/hawk-skad.h index 7bfeec19..aa3e9859 100644 --- a/hawk/lib/hawk-skad.h +++ b/hawk/lib/hawk-skad.h @@ -207,6 +207,19 @@ HAWK_EXPORT int hawk_bchars_to_ipad_bytes ( hawk_oow_t blen ); +#define hawk_ucstr_to_ipad_bytes(str,buf,blen) hawk_uchars_to_ipad_bytes(str, hawk_count_ucstr(str,buf,len) +#define hawk_bcstr_to_ipad_bytes(str,buf,blen) hawk_bchars_to_ipad_bytes(str, hawk_count_bcstr(str,buf,len) + +#if defined(HAWK_OOCH_IS_UCH) +# define hawk_ipad_bytes_to_oocstr hawk_ipad_bytes_to_ucstr +# define hawk_oochars_to_ipad_bytes hawk_uchars_to_ipad_bytes +# define hawk_oocstr_to_ipad_bytes hawk_ucstr_to_ipad_bytes +#else +# define hawk_ipad_bytes_to_oocstr hawk_ipad_bytes_to_bcstr +# define hawk_oochars_to_ipad_bytes hawk_bchars_to_ipad_bytes +# define hawk_oocstr_to_ipad_bytes hawk_bcstr_to_ipad_bytes +#endif + HAWK_EXPORT int hawk_ipad_bytes_is_v4_mapped ( const hawk_uint8_t* iptr, hawk_oow_t ilen