summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-20 01:27:08 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-20 01:27:08 +0800
commitbb629566335ef1ea90859bd467028d52e67e0f81 (patch)
treef7c3f7bbc6786c04ee22bcfd71a28ff96521f911 /mbbsd
parentfeea3d3fe713669d37e21c66b1e7cb57019ef9f7 (diff)
downloadpttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.tar
pttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.tar.gz
pttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.tar.bz2
pttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.tar.lz
pttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.tar.xz
pttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.tar.zst
pttbbs-bb629566335ef1ea90859bd467028d52e67e0f81.zip
init uninitialize data
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2413 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/edit.c20
1 files changed, 4 insertions, 16 deletions
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) {