diff options
author | Willy Tarreau <w@1wt.eu> | 2006-07-16 14:53:45 +0200 |
---|---|---|
committer | Willy Tarreau <willy@wtap.(none)> | 2006-07-26 11:55:33 +0200 |
commit | a5e8c673ac4c319318ac6ae3e29d31821edfa01e (patch) | |
tree | b2e23bb6ccce044de833527adcfaff4b02bfab79 /flx/input_file.c | |
parent | [RELEASE] flxutils-0.1.26 (diff) | |
download | flxutils-a5e8c673ac4c319318ac6ae3e29d31821edfa01e.tar.xz |
[RELEASE] flxutils-0.1.27v0.1.27
Diffstat (limited to 'flx/input_file.c')
-rw-r--r-- | flx/input_file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/flx/input_file.c b/flx/input_file.c index 5a4b0c5..ec50c02 100644 --- a/flx/input_file.c +++ b/flx/input_file.c @@ -4,6 +4,7 @@ #include <sys/types.h> #include <stdlib.h> #include <dirent.h> +#include <ctype.h> #include "input_file.h" #include "utils.h" @@ -42,6 +43,10 @@ char **get_field1(char *line) { *pline++ = *(line+1); line += 2 ; } + else if (*line == '%' && isxdigit(*(line+1)) && isxdigit(*(line+2))) { + *pline++ = HEX2DEC(line[1])*16+HEX2DEC(line[2]); + line += 3; + } else { *pline++ = *line++ ; } @@ -116,7 +121,7 @@ t_file_desc *fill_from_signfs_line(char **tab, char **rpath, t_file_desc **desc) if (p1[0] != '-') { for (i = 0 ; p1[i] ; i++) temp[i] = (unsigned char) - (HEXTODEC(p1[i * 2]) * 16 + HEXTODEC(p1[i * 2 + 1])); + (HEX2DEC(p1[i * 2]) * 16 + HEX2DEC(p1[i * 2 + 1])); (*desc)->md5 = MALLOC(i); memcpy((*desc)->md5, temp, i); } |