aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pies.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pies.c b/src/pies.c
index 33244ad..d1bcfd8 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -540,8 +540,8 @@ _cb_command (enum grecs_callback_command cmd,
grecs_error (locus, 0, "wordsplit: %s", strerror (errno));
return 1;
}
- comp->argc = ws.ws_wordc;
- comp->argv = ws.ws_wordv;
+ wordsplit_getwords (&ws, &comp->argc, &comp->argv);
+ wordsplit_free (&ws);
break;
case GRECS_TYPE_ARRAY:
@@ -582,6 +582,7 @@ _cb_env (enum grecs_callback_command cmd,
grecs_locus_t *locus,
void *varptr, grecs_value_t *value, void *cb_data)
{
+ size_t argc;
char **argv;
char ***penv = varptr;
struct wordsplit ws;
@@ -594,9 +595,8 @@ _cb_env (enum grecs_callback_command cmd,
grecs_error (locus, 0, "wordsplit: %s", strerror (errno));
return 1;
}
- argv = ws.ws_wordv;
- ws.ws_wordc = 0;
- ws.ws_wordv = NULL;
+ wordsplit_getwords (&ws, &argc, &argv);
+ wordsplit_free (&ws);
break;
case GRECS_TYPE_ARRAY:
@@ -2075,7 +2075,7 @@ main (int argc, char **argv)
instance++;
}
setenv ("PIES_INSTANCE", instance, 1);
- log_tag = instance;
+ log_tag = grecs_strdup (instance);
if (!init_process)
set_conf_file_names (instance);

Return to:

Send suggestions and report system problems to the System administrator.