From b65c2563a8a425593f91dfcb82ede8cf53fec6cd Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 21 Apr 1997 06:15:52 +0000 Subject: [PATCH] First a bit working version. --- lib/lib.h | 10 ++++++++++ lib/log.c | 2 +- lib/wordsplit.c | 18 +++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/lib.h b/lib/lib.h index 2f27ffe4..929fa9bf 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -24,6 +24,8 @@ ulg temprand(uns); #define TF_QUEUE_CONTROL "c" #define TF_QUEUE_DATA "d" #define TF_DECODE "x" +#define TF_TRANSFORM "s" +#define TF_OBJECT "o" /* Config Files */ @@ -115,3 +117,11 @@ int wordsplit(byte *, byte **, uns); /* patmatch.c */ int match_pattern(byte *, byte *); + +/* md5hex.c */ + +void md5_to_hex(byte *, byte *); +void hex_to_md5(byte *, byte *); + +#define MD5_SIZE 16 +#define MD5_HEX_SIZE 33 diff --git a/lib/log.c b/lib/log.c index 267270aa..55431cc1 100644 --- a/lib/log.c +++ b/lib/log.c @@ -24,7 +24,7 @@ logit(int level, byte *msg, va_list args) tim = time(NULL); tm = localtime(&tim); - strftime(buf, sizeof(buf), "%d-%m-%y %H-%M-%S", tm); + strftime(buf, sizeof(buf), "%d-%m-%y %H:%M:%S", tm); fprintf(stderr, "%s %s [%d] <%d> ", buf, progname, pid, level); vfprintf(stderr, msg, args); fputc('\n', stderr); diff --git a/lib/wordsplit.c b/lib/wordsplit.c index b1b2ada3..eea94762 100644 --- a/lib/wordsplit.c +++ b/lib/wordsplit.c @@ -22,9 +22,21 @@ wordsplit(byte *src, byte **dst, uns max) break; if (cnt >= max) return -1; - dst[cnt++] = src; - while (*src && !Cspace(*src)) - src++; + if (*src == '"') + { + src++; + dst[cnt++] = src; + while (*src && *src != '"') + src++; + if (*src) + *src++ = 0; + } + else + { + dst[cnt++] = src; + while (*src && !Cspace(*src)) + src++; + } } return cnt; } -- 2.39.2