Category : C Source Code
Archive   : C-TOOLBX.ZIP
Filename : BT_UTIL.C
#include "stdio.h"
int clr_mem(p,c,n) /* clear a memory area */
char *p ; /* start of the memory area */
int c ; /* value to write there */
int n ; /* number of bytes to clear */
{
while( n > 0 )
{ *p = c ; /* clear current location */
p = p + 1 ; /* advance pointer */
n = n - 1 ; /* reduce byte count */
}
}
int mover(to,from,nbytes) /* moves bytes allowing for overlap */
char *to ; /* move the data to here */
char *from ; /* move it from here */
int nbytes ; /* number of bytes to move */
{
if( from > to )
{
while( nbytes > 0 ) /* stop when all bytes moved */
{ *to = *from ; /* move a byte */
to = to + 1 ; /* advance pointers to and from */
from = from + 1 ;
nbytes = nbytes - 1 ; /* reduce bytes left */
}
}
}
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/