/* ,file-id archive://[lord]/392/vu/./mem.c/1998-05-18
*/
/*	Copyright (C) 1997 Tom Lord
 * 
 * This program is provided to you under the terms of the Liberty Software
 * License.  You are NOT permitted to redistribute, modify, or use it
 * except in very specific ways described by that license.
 *
 * This software comes with NO WARRANTY.
 * 
 * You should have received a copy of the Liberty Software License
 * along with this software; see the file =LICENSE.  If not, write to
 * the Tom Lord, 1810 Francisco St. #2, Berkeley CA, 94703, USA.  
 */



#include "mem.h"



void
memset0 (char * mem, int size)
{
  while (size--)
    *(mem++) = 0;
}

int
memoccurrences (unsigned char * mem, unsigned int c, int size)
{
  int x;
  x = 0;
  while (size--)
    if (*mem++ == c)
      ++x;
  return x;
}
