From bb629566335ef1ea90859bd467028d52e67e0f81 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 19 Jan 2005 17:27:08 +0000 Subject: init uninitialize data git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2413 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 34ab3488..9dfcaae6 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -135,24 +135,12 @@ indigestion(int i) void init_edit_buffer(editor_internal_t *buf) { - buf->firstline = NULL; - buf->lastline = NULL; - buf->currline = NULL; - buf->blockline = NULL; - buf->top_of_win = NULL; - buf->deleted_lines = NULL; + memset(buf, 0, sizeof(editor_internal_t)); - buf->insert_character = 1; - buf->redraw_everything = 1; - buf->indent_mode = 0; - buf->line_dirty = 0; - buf->currpnt = 0; - buf->totaln = 0; - buf->my_ansimode = 0; - buf->phone_mode = 0; - buf->phone_mode0 = 0; buf->blockln = -1; buf->insert_c = ' '; + buf->insert_character = 1; + buf->redraw_everything = 1; } static void enter_edit_buffer(void) @@ -1807,7 +1795,7 @@ vedit(char *fpath, int saveheader, int *islocal) local_article = 1; } curr_buf->currline = curr_buf->firstline; - curr_buf->currpnt = curr_buf->currln = curr_buf->curr_window_line = curr_buf->edit_margin = last_margin = 0; + last_margin = 0; while (1) { if (curr_buf->redraw_everything || curr_buf->blockln >= 0) { -- cgit v1.2.3