diff options
Diffstat (limited to 'src/method.c')
-rw-r--r-- | src/method.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/method.c b/src/method.c index 7811612..8fe81fb 100644 --- a/src/method.c +++ b/src/method.c @@ -21,15 +21,15 @@ struct method_descr { const char *name; - + int (*init) (struct access_method *); int (*done) (struct access_method *); int (*free) (struct access_method *, void *); void *(*open) (struct access_method *); int (*close) (struct access_method *, void *); - - int (*get) (struct access_method *, void *, unsigned, unsigned); + + int (*get) (struct access_method *, void *, unsigned, unsigned); int (*run) (struct access_method *, void *, const char *); int (*quote) (struct access_method *, void *, const char *, char **, size_t *); }; @@ -60,7 +60,7 @@ method_init (struct access_method *method) { struct method_descr *mp = method_tab + method->type; int rc = 0; - + if (method->init_passed++) return 0; if (debug_level > 1) @@ -96,13 +96,13 @@ method_close (struct access_method *method, void *handle) return 0; return mp->close (method, handle); } - + int method_done (struct access_method *method) { struct method_descr *mp = method_tab + method->type; int rc = 0; - + if (method->init_passed == 0) return 0; if (--method->init_passed) @@ -114,7 +114,7 @@ method_done (struct access_method *method) mp->name, SP (method->query)); for (i = 0; i < method->parmc; i++) logmsg (LOG_DEBUG, " parmv[%d]=%s", i, method->parmv[i]); - } + } if (mp->done) rc = mp->done (method); free (method->result); @@ -135,7 +135,7 @@ method_run (struct access_method *method, void *handle, const char *cmd) else logmsg (LOG_DEBUG, "Running method: %s", mp->name); } - + if (!method->init_passed) { logmsg (LOG_CRIT, "INTERNAL ERROR: Method %s \"%s\" not initialized", @@ -211,15 +211,15 @@ method_quote_string (struct access_method *method, void *handle, if (mp->quote) return mp->quote (method, handle, input, poutput, psize); - + size = argcv_quoted_length (input, "e); output = xmalloc (size + 1); argcv_quote_copy (output, input); output[size] = 0; - + *poutput = output; if (psize) *psize = size; return 0; } - + |