/* Allocate a memory block from a block of memory declared with MEMB(). */
char* memb_alloc(struct memb_blocks *m)
/* Allocate a memory block from a block of memory declared with MEMB(). */
char* memb_alloc(struct memb_blocks *m)
{
  int i;
  char *ptr;
  ptr = m->mem;
  for(i = 0; i < m->num; ++i) {
    if(*ptr == 0) {
      ++*ptr;
      return ptr + 1;
    }
    ptr += m->size + 1;
  }
  return NULL;
}