@@ 8,8 8,8 @@
#include <stdlib.h>
#include <string.h>
-static const int hex_table_size = 16;
-static const int hex_table[hex_table_size] = {
+#define HEX_TABLE_SIZE 16
+static const int hex_table[HEX_TABLE_SIZE] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
static const char *format_error =
@@ 33,7 33,7 @@ Color strtocolor(char *string)
while (*character != '\0') {
int value = -1;
int j;
- for (j = 0; j < hex_table_size; j += 1) {
+ for (j = 0; j < HEX_TABLE_SIZE; j += 1) {
if (hex_table[j] == *character) {
value = j;
break;