diff --git a/utils/magiedit/main.c b/utils/magiedit/main.c index 40c7025..50c1ded 100644 --- a/utils/magiedit/main.c +++ b/utils/magiedit/main.c @@ -43,6 +43,7 @@ char *message_editor() { int q_line_count; int q_unquote; int z; + int redraw; position_x = 0; position_y = 0; @@ -189,6 +190,7 @@ char *message_editor() { } else if (strcasecmp(line, "/Q") == 0) { // quote if (quote_line_count > 0) { + redraw = 1; od_clr_scr(); od_set_cursor(1, 1); od_set_color(L_WHITE, D_BLUE); @@ -206,24 +208,27 @@ char *message_editor() { q_done = 0; q_marker = ' '; while (!q_done) { - for (i=q_start;i= quote_line_count) { q_start = quote_line_count - 21; } + redraw = 1; } + if (!redraw) { + q_marker = ' '; + for (j=0;j 20) { + if (position_y > 20) { od_set_cursor(23, position_x + 1); - } else { - od_set_cursor(position_y - top_of_screen + 3, position_x + 1); + } else { + od_set_cursor(position_y - top_of_screen + 3, position_x + 1); } } } @@ -571,6 +639,9 @@ int main(int argc, char **argv) FILE *fptr; char *body; int i; + + msgpath = NULL; + #if _MSC_VER int j; @@ -598,6 +669,11 @@ int main(int argc, char **argv) path_sep = '/'; #endif + if (msgpath == NULL) { + fprintf(stderr, "No MSGTMP switch specified!\n"); + exit(0); + } + od_init(); msgtmp = (char *)malloc(strlen(msgpath) + 8);