From e28e52c09c8aedfdce4d0673f84382a3ee44f63b Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 16 Nov 2014 01:57:44 +0100 Subject: Moved strlib_s, stringbuf_s and sv_s into strlib.c Signed-off-by: Haru --- src/common/strlib.c | 4 ++++ src/common/strlib.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/strlib.c b/src/common/strlib.c index 592390770..4b69477dd 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -18,6 +18,10 @@ #define J_MAX_MALLOC_SIZE 65535 +struct strlib_interface strlib_s; +struct stringbuf_interface stringbuf_s; +struct sv_interface sv_s; + // escapes a string in-place (' -> \' , \ -> \\ , % -> _) char* jstrescape (char* pt) { //copy from here diff --git a/src/common/strlib.h b/src/common/strlib.h index 00a588772..8f61470cf 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -92,7 +92,7 @@ struct strlib_interface { /// The output buffer must be at least count*2+1 in size. /// Returns true on success, false on failure. bool (*bin2hex) (char* output, unsigned char* input, size_t count); -} strlib_s; +}; struct strlib_interface *strlib; @@ -108,7 +108,7 @@ struct stringbuf_interface { void (*Clear) (StringBuf* self); void (*Destroy) (StringBuf* self); void (*Free) (StringBuf* self); -} stringbuf_s; +}; struct stringbuf_interface *StrBuf; @@ -152,7 +152,7 @@ struct sv_interface { /// Tracks the progress of the operation (current line number, number of successfully processed rows). /// Returns 'true' if it was able to process the specified file, or 'false' if it could not be read. bool (*readdb) (const char* directory, const char* filename, char delim, int mincols, int maxcols, int maxrows, bool (*parseproc)(char* fields[], int columns, int current)); -} sv_s; +}; struct sv_interface *sv; -- cgit v1.2.3-70-g09d2