X-Git-Url: http://git.tuebingen.mpg.de/?p=tfortune.git;a=blobdiff_plain;f=tfortune.c;h=e11c6da7556e7f2b613b1be7829bc3914b8d62a6;hp=e5b2061f22f5d537e14f5e8282013c042aa301f6;hb=6275dd846813572558b81d96fe04da9a26a73306;hpb=e5a096f0056656151ad4aa9820633f51817919f2 diff --git a/tfortune.c b/tfortune.c index e5b2061..e11c6da 100644 --- a/tfortune.c +++ b/tfortune.c @@ -216,7 +216,7 @@ static int read_tag_expression(struct iovec *result) return ret; } -static int tx2ast(struct iovec *tx, struct txp_context **ast) +static int tx2ast(const struct iovec *tx, struct txp_context **ast) { int ret; char *errmsg; @@ -335,7 +335,7 @@ static struct epi_iter *epi_iter_new(void) regfile_iter_next(riter) ) { eiter->num_maps++; - eiter->maps = realloc(eiter->maps, + eiter->maps = xrealloc(eiter->maps, eiter->num_maps * sizeof(*eiter->maps)); eiter->maps[eiter->num_maps - 1] = iov; } @@ -930,11 +930,11 @@ static void show_subcommand_summary(bool verbose) for (i = 0; i < LSG_NUM_TFORTUNE_SUBCOMMANDS; i++) { if (i > 0) n += printf(", "); - n += printf("%s", subcommand_names[i]); if (n > 70) { printf("\n\t"); n = 8; } + n += printf("%s", subcommand_names[i]); } printf("\n"); } @@ -1448,7 +1448,7 @@ static int com_compgen(void) } break; case WT_LONG_OPT_WITH_ARG: - if (strcmp(prev, "--basename") == 0) { + if (strcmp(prev, "--basedir") == 0) { activate_dirname_completion(); return 1; }