This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: BUFSIZE
- From: Stan Shebs <shebs at apple dot com>
- To: MA Dunzi <tadalunch at s5 dot xrea dot com>
- Cc: xconq7 at sources dot redhat dot com
- Date: Wed, 03 Jul 2002 09:45:38 -0700
- Subject: Re: BUFSIZE
- Organization: Apple Computer, Inc.
- References: <200207031633.g63GXINL013523@smtp14.dti.ne.jp>
MA Dunzi wrote:
>
> kernel/config.h says:
> |/* All names, phrases, and messages must be able to fit in statically
> | allocated buffers of this size. */
> |
> |#define BUFSIZE 255
>
> but kernel/lisp.c says:
> |#define BIGBUF 1000
>
> |
>
> Why is 'BIGBUF' this big?
> I think '#define BIGBUF 50' will do, if 'BUFSIZE' is set to 255.
BIGBUF is that large to handle pathological cases in GDL files,
such as very large documentation blocks, while BUFSIZE is only
needed to handle user-visible things.
Of course, both of those are holdovers from 80s-style programming,
and all the buffers ought to be dynamically sized everywhere.
Help info for instance was switched to obstacks some time ago.
Stan