Category : Files from Magazines
Archive   : PJ91.ZIP
Filename : B_CONSTR.C
#include
#include "textbuf.h"
PUBLIC textbuf *b_construct( textbuf *b, int nrows, int ncols )
{
/* Initialize a textbuf, Return b on success, NULL on failure */
bufsize asize = nrows * ncols;
if( asize >= MAXBSIZE ) /* Won't fit in an 8086 segment */
b = NULL;
else if( !(b->buf = BMALLOC(asize)) ) /* get the actual buffer */
b = NULL;
else
{
b->nrows = nrows;
b->ncols = ncols;
b->row = 0;
b->col = 0;
b->p = b->buf;
b_clearbuf( b, ' ' );
b->magic = B_MAGIC;
}
return b;
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/