* If the character is an hexa digit, get its value. */
| 1894 | * If the character is an hexa digit, get its value. |
| 1895 | */ |
| 1896 | static int GetHexDigit ( char ch ) |
| 1897 | { |
| 1898 | if ( ch >= '0' && ch <= '9' ) { |
| 1899 | return ch - '0'; |
| 1900 | } |
| 1901 | if ( ch >= 'A' && ch <= 'F' ) { |
| 1902 | return ch - 'A' + 10; |
| 1903 | } |
| 1904 | if ( ch >= 'a' && ch <= 'f' ) { |
| 1905 | return ch - 'a' + 10; |
| 1906 | } |
| 1907 | return -1; |
| 1908 | } |
| 1909 | |
| 1910 | /** |
| 1911 | * Convert C style \a, \b, \f, \n, \r, \t, \v, \xhh and \uhhhh into their indicated characters. |