diff --git a/src/baseconv.c b/src/baseconv.c index ec978e5..3d9c4c8 100644 --- a/src/baseconv.c +++ b/src/baseconv.c @@ -143,14 +143,3 @@ void bcv_guess_base(const char * restrict num) return ; } -//!NOTE : for all the different variations of the ASCII table, -// : Only printable characters, represent letters, digits, punctuation marks, and a few miscellaneous symbols. -// : You will find almost every character on your keyboard. -// -//!WARNING : The extended ASCII code are not yet supported -static int is_printable(const char * ascii_code) -{ - unsigned char code = (*ascii_code& 0xff) ; - return (0x20 < code) ? ( code < 0x7f ) : 0 ; -} - diff --git a/src/baseconv.h b/src/baseconv.h index 650e3ac..29911b6 100644 --- a/src/baseconv.h +++ b/src/baseconv.h @@ -95,6 +95,7 @@ struct __bcb_t int _index ; }; +//!TODO : Use memory stream instead extern char bc_global_buffer[0xff] ; extern uf64_t __allbase_enable__; @@ -144,7 +145,6 @@ static __inline__ void print_symbol_seperation(void) } - /* @fn __common_prototype_base_convertion(int , int , struct __bcb_t*) * @brief common logic used by the bc_* function to convert * @param int - the value @@ -164,6 +164,16 @@ static void __common_prototype_base_convertion(uf64_t value , int base , struc } } +///////!NOTE : for all the different variations of the ASCII table, +// Only printable characters, represent letters, digits, punctuation marks, and a few miscellaneous symbols. +// You will find almost every character on your keyboard. +/////!WARNING : The extended ASCII code are not yet supported + +static __inline__ unsigned char is_printable(const char *character) +{ + unsigned char ascii_code = (*character & 0xff) ; + return (0x20 < ascii_code)? (0x7ff > ascii_code) : 0; +} /* the exposed function */ @@ -180,9 +190,7 @@ __BCX(char *) bc_hex(uf64_t value) ; __BCX(char *) bc_dec(uf64_t value) ; __BCX(char *) bc_chr(uf64_t value) ; __BCX(void) bcv_print(uf64_t value) ; - - __BCX(void) bcv_guess_base(const char * rawinput) ; -static int is_printable(const char *code_ascii); + #endif //!__BASECONV