/**      ascii_functions.h
 **
 ** Author: Ted Schmitz
 ** Creation date: 10/17/2000
 **
 **      This module contains all the symbols to support the miscellaneous 
 ** functions to convert and manipulate ASCII data.
 **/
#ifndef ASCII_FUNCTIONS_H
#define ASCII_FUNCTIONS_H
/* external protypes */
extern char conv_ascii_hex_byte_to_binary(char byte);
extern int conv_ascii_hex_string_to_binary(char * hex_string,
					   int string_length,
					   char * conv_data, 
					   int data_length);
extern int conv_ascii_decimal_string_to_binary(char * dec_string);
                                               
extern void disp_then_space(const char * msg, int column);
extern long ll_strtol(const char * src_string, char * endptr, int radix);
extern int ll_atoi(const char * src_string);
extern int add_two_ascii_dec_values(const char * ascii_num_1, 
                                    char * ascii_num_2);
void format_ascii_dec_value(const char * ascii_dec_value, 
                            char * formatted_ascii_bytes);
extern unsigned my_strtol(const char *inStr, int radix);

#ifndef NO_PROBLEM_DETECTED
#define NO_PROBLEM_DETECTED 0
#endif

#ifndef PROBLEM_DETECTED
#define PROBLEM_DETECTED -1
#endif

/**   Maximum number of ASCII decimal digits that can be converted by function 
 ** "conv_ascii_decimal_string_to_binary()" to binary.
 **/
#define MAX_ASCII_DEC_LEN 10

/**  The symbols below represent all of the values that can be used in the
 ** "radix" parameter in function "ll_strtol()"
 **/
#define CONV_TO_DEC 10           /* convert to decimal value */
#define CONV_TO_HEX 16           /* convert to hex value */
/* end "radix" parameter definitions */

#define ASCII_ZERO 0x30         /* value for ASCII zero */

#define MAX_ASCII_DEC_DIGITS 20 /* maximum number of ASCII decimal digits that
                                   can be added to the sum. */

#
#endif /* end '#ifndef ASCII_FUNCTIONS_H...' */
