summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/strlib.c4
-rw-r--r--src/common/strlib.h6
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;