BUFSIZE

Stan Shebs shebs@apple.com
Wed Jul 3 09:52:00 GMT 2002


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



More information about the Xconq7 mailing list