Category : C Source Code
Archive   : JAZ_CLIB.ZIP
Filename : JZPUSH.C
/*
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³jzpush.c ³
³Push Data onto the stack ³
³Synopsis ³
³ TSTKHEAD whead; ³
³ jzintstk(&whead); ( initialize the stack header record ) ³
³ jzpush(&whead,wstr,sizeof(TDATA)); ³
³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*/
jzpush(fhead,fdata,fsize)
TSTKHEAD *fhead; /* head of stack structure */
char *fdata; /* pointer to data to save */
unsigned int fsize; /* number of bytes to put on stack */
{
TSTACK *wtemp;
wtemp = (TSTACK *) malloc(sizeof(TSTACK)); /* get pointer to struct */
wtemp->pointer = (char *) malloc(fsize); /* get pointer to data */
/* copy the data onto the stack */
memcpy(wtemp->pointer,fdata,fsize);
wtemp->wint = fsize; /* save size of data */
if (fhead->last == 0) { /* empty stack */
wtemp->prev = 0;
fhead->last = wtemp; /* set last item (top of stack) */
fhead->first = wtemp; /* set first item */
fhead->numitems = 1; /* set number of items */
}
else {
wtemp->prev = fhead->last; /* set link to stack top */
fhead->last = wtemp; /* set new top of stack */
fhead->numitems++; /* increment stack pointer */
}
}
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/