This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BUFSIZE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]