X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=client.c;h=84b7580cf9554c433651da1f3eed28a6f1f39a74;hb=HEAD;hp=ed0d5e02f7881409b4f5c5ce9735a5a42e486555;hpb=cdbc8067a2e27ee7f9e0d8ff11cf415603fc0558;p=paraslash.git diff --git a/client.c b/client.c index ed0d5e02..d2d11fd3 100644 --- a/client.c +++ b/client.c @@ -246,6 +246,12 @@ I9E_DUMMY_COMPLETER(init); static struct i9e_completer completers[]; +static void ll_completer(struct i9e_completion_info *ci, + struct i9e_completion_result *cr) +{ + i9e_ll_completer(ci, cr); +} + static void help_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { @@ -341,7 +347,7 @@ static void setatt_completer(struct i9e_completion_info *ci, if (ret < 0) goto out; num_atts = ret; - sl = para_realloc(sl, (2 * num_atts + 1) * sizeof(char *)); + sl = arr_realloc(sl, 2 * num_atts + 1, sizeof(char *)); for (i = 0; i < num_atts; i++) { char *orig = sl[i]; sl[i] = make_message("%s+", orig); @@ -435,7 +441,7 @@ static void select_completer(struct i9e_completion_info *ci, goto free_moods; num_pl = ret; n = num_moods + num_pl; - mops = para_malloc((n + 1) * sizeof(char *)); + mops = arr_alloc(n + 1, sizeof(char *)); for (i = 0; i < num_moods; i++) mops[i] = make_message("m/%s", moods[i]); for (i = 0; i < num_pl; i++) @@ -543,6 +549,7 @@ __noreturn static void interactive_session(void) i9e_close(); para_log = stderr_log; out: + free(ici.history_file); if (ret < 0) PARA_ERROR_LOG("%s\n", para_strerror(-ret)); exit(ret < 0? EXIT_FAILURE : EXIT_SUCCESS); @@ -660,8 +667,6 @@ int main(int argc, char *argv[]) /* these are not errors */ case -E_SERVER_CMD_SUCCESS: case -E_EOF: - case -E_SERVER_EOF: - case -E_BTR_EOF: ret = 0; break; default: ret = -E_SERVER_CMD_FAILURE;