ascii.c File Reference
#include "config.h"
#include "ascii.h"
Go to the source code of this file.
|
Functions |
| U8 | ascii_to_bin (U8 c) |
| | This function returns the binary value of an ascii digit.
|
| U8 | bin_to_ascii (U8 c) |
| | This function returns the ascii value of a quartet.
|
Function Documentation
This function returns the binary value of an ascii digit.
- Parameters:
-
- Returns:
- none
/
Definition at line 32 of file ascii.c.
00033 {
00034 if (c>='a') return(c-('a'-0x0A));
00035 if (c>='A') return(c-('A'-0x0A));
00036 return(c-'0');
00037 }
This function returns the ascii value of a quartet.
- Parameters:
-
- Returns:
- none
/
Definition at line 47 of file ascii.c.
00048 {
00049 if (c>=0x0A) return (c+('A'-0x0A));
00050 return (c+'0');
00051 }