knf ch_enlargebufs(), to be *consistent* with the rest of this file...

This commit is contained in:
lukem 2001-04-13 01:04:19 +00:00
parent 4241f48b35
commit 5e45b51a6b

View File

@ -1,4 +1,4 @@
/* $NetBSD: chared.c,v 1.12 2001/01/10 07:45:41 jdolecek Exp $ */
/* $NetBSD: chared.c,v 1.13 2001/04/13 01:04:19 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: chared.c,v 1.12 2001/01/10 07:45:41 jdolecek Exp $");
__RCSID("$NetBSD: chared.c,v 1.13 2001/04/13 01:04:19 lukem Exp $");
#endif
#endif /* not lint && not SCCSID */
@ -494,10 +494,11 @@ ch_enlargebufs(el, addlen)
EditLine *el;
size_t addlen;
{
size_t sz = el->el_line.limit - el->el_line.buffer + EL_LEAVE;
size_t newsz = sz * 2;
size_t sz, newsz;
char *newbuffer, *oldbuf, *oldkbuf;
sz = el->el_line.limit - el->el_line.buffer + EL_LEAVE;
newsz = sz * 2;
/*
* If newly required length is longer than current buffer, we need
* to make the buffer big enough to hold both old and new stuff.