OSSP CVS Repository

ossp - Difference in ossp-pkg/cfg/cfg_syn.c versions 1.11 and 1.12
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/cfg/cfg_syn.c 1.11 -> 1.12

--- cfg_syn.c    2002/07/10 12:00:23     1.11
+++ cfg_syn.c    2002/07/10 14:46:28     1.12
@@ -50,14 +50,16 @@
 cfg_rc_t cfg_syn_import(
     cfg_t *cfg, 
     cfg_node_t **node, 
-    const char *input,
-    char *err_buf, size_t err_len)
+    const char *in_ptr,
+    size_t in_len,
+    char *err_buf, 
+    size_t err_len)
 {
     cfg_syn_ctx_t ctx;
     void *yyscan;
     
     /* argument sanity checking */
-    if (node == NULL || input == NULL)
+    if (node == NULL || in_ptr == NULL || in_len == 0)
         return CFG_ERR_ARG;
 
     /* initialize scanner */
@@ -66,9 +68,9 @@
 
     /* establish our own context which is passed 
        through the parser and scanner */
-    ctx.inputptr = input;
-    ctx.inputbuf = input;
-    ctx.inputlen = strlen(input);
+    ctx.inputptr = in_ptr;
+    ctx.inputbuf = in_ptr;
+    ctx.inputlen = in_len;
     ctx.cfg      = cfg;
     ctx.node     = NULL;
     ctx.rv       = CFG_OK;

CVSTrac 2.0.1