Buffer v1.4

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 08/21/97


1. Resized most buffers in act.comm.c and act.informative.c
2. Can now report how much space a function used in its buffer.
3. Migration begun toward snprintf() utilization.
4. More effective at detecting buffer overruns.
5. Fixed a small non-critical counting bug with number of overruns.
6. Added online buffer control command.
7. Added small help file called buffer.txt.
8. CircleMUD socket buffers now use this system.
9. Fixed a missed Windows buf variable.

In addition, if PARANOID_BUFFER is declared (the memset() one), then it
will search for the last used character in the string, otherwise it just
does a strlen() since it only does a *buf='\0' when it's given out. Of
course, the get_used() function currently reports the entire buffer was
used, I'll fix that later.  If you want an accurate count in this version,
don't make it paranoid.

#3 is Jeremy'y idea.  The basic premise is that since we know the size of
the buffer at run-time, we can simply use snprintf() to avoid all overruns
instead of trying to detect them after the fact.  This requires changing
send_to_char(), act(), and the like to accept a 'struct buf_data *' instead
of a 'char *' though.

I'll look into the 'buffer ought to be null' message and why you might be
getting that shortly.  I personally have never seen that message except
when I force the buffer list to be dumped by running the do_crash()
overflow function, but that's what debugging checks get you, messages to go
on instead of crashes. :)

People might be happy to know that I'm going to start posting upgrade
patches from v1.4 (and the full version also) instead of forcing a 250k
download every time.

 --
greerga@muohio.edu me@null.net | Genius may have its limitations, but stupidity
http://www.muohio.edu/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST