diff options
Diffstat (limited to 'usr.bin/mg/window.c')
-rw-r--r-- | usr.bin/mg/window.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/usr.bin/mg/window.c b/usr.bin/mg/window.c index 9331e54fe51..b56722605b1 100644 --- a/usr.bin/mg/window.c +++ b/usr.bin/mg/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.17 2005/06/14 18:14:40 kjell Exp $ */ +/* $OpenBSD: window.c,v 1.18 2005/10/11 01:08:53 kjell Exp $ */ /* This file is in the public domain. */ @@ -27,27 +27,9 @@ new_window(BUFFER *bp) wp->w_wrapline = NULL; if (bp) bp->b_nwnd++; - LIST_INIT(&wp->w_undo); - wp->w_undoptr = NULL; - wp->w_undopos = 0; - return (wp); } -void -free_window(MGWIN *wp) -{ - struct undo_rec *rec, *next; - - rec = LIST_FIRST(&wp->w_undo); - while (rec != NULL) { - next = LIST_NEXT(rec, next); - free_undo_record(rec); - rec = next; - } - free(wp); -} - /* * Reposition dot in the current window to line "n". If the argument is * positive, it is that line. If it is negative it is that line from the @@ -177,7 +159,7 @@ onlywind(int f, int n) wp->w_bufp->b_markp = wp->w_markp; wp->w_bufp->b_marko = wp->w_marko; } - free_window(wp); + free(wp); } while (curwp->w_wndp != NULL) { wp = curwp->w_wndp; @@ -188,7 +170,7 @@ onlywind(int f, int n) wp->w_bufp->b_markp = wp->w_markp; wp->w_bufp->b_marko = wp->w_marko; } - free_window(wp); + free(wp); } lp = curwp->w_linep; i = curwp->w_toprow; @@ -425,7 +407,7 @@ delwind(int f, int n) nwp->w_wndp = wp->w_wndp; break; } - free_window(wp); + free(wp); return (TRUE); } |