home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / libnix-0.8-src.lha / libnix-0.8 / sources / nix / string / memset.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-12  |  170 b   |  15 lines

  1. #include <string.h>
  2.  
  3. void *memset(void *s,int c,size_t n)
  4.   if (n != 0)
  5.   {
  6.     unsigned char *p=s;
  7.     do
  8.     {
  9.       *p++=c;
  10.     }while(--n != 0);
  11.   }
  12.   return s;
  13. }
  14.