Category : C Source Code
Archive   : BITSTRG.ZIP
Filename : DECARBIT.C

 
Output of file : DECARBIT.C contained in archive : BITSTRG.ZIP
/*
librairie : bitstrg

decarbit -- declaration d'un champ memoire comme etant un champ de bits
*/

/*
#define debug
*/

/* standard include */

#include

#include "bitstrg.h"

/*
declaration of a memory field as an array of bit

return a pointer on the array parameters structure or NULL if problem
*/

struct SPARRAY* decarbit(ptr,nombr)
ELEBAR* ptr; /* pointer on the memory field */
unsigned nombr; /* number of elements in the field */
{

struct SPARRAY* pnt;

if(nombr == 0) {
return(NULL);
}
if((pnt = (struct SPARRAY *) calloc (1,sizeof(struct SPARRAY))) != NULL) {
pnt->pntarray = ptr;
pnt->numlbit = (nombr * SIZE) - 1;
}
return(pnt);
}


  3 Responses to “Category : C Source Code
Archive   : BITSTRG.ZIP
Filename : DECARBIT.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/