Dynamic buffers.

From: Sean Butler (sbutler@DEVEAST.COM)
Date: 12/15/97


I have just uploaded a file to the ftp site called buf.tar.gz

This file contains buf.c, buf.h, and readme.buf

These will give you the ability to write into a buffer that
will automatically reallocate itself as the text overflows it.

This is an ADT, it provides you with an interface that you must
use to ensure data integrity.

newbuf() // returns a new buffer

bufcpy() // copy a string to a buffer

bufcat() // cat a string onto a buffer

bprintf()  // print into a buffer using a format string and variable args

buftos()  // given a buffer return the char * (string)

bfree()  // free the buffer.


More will come later as the need arises. ie.  bscanf() etc.

If you like it drop me a mail :-)

--Sean
----

     /'''''''''''''''''\'\       The final aspiration of all coders?
    |                   | |
    | /* Sean Butler */ | |      Sean Butler
    |                   | |      Coder for finality.com 4000
    |      exit(0);     | |      xin@finality.com
    |                   | |
    |                   | |
   \\//................\\\//


     +------------------------------------------------------------+
     | 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