Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /* memset( void *, int, size_t )
  2.  
  3.    This file is part of the Public Domain C Library (PDCLib).
  4.    Permission is granted to use, modify, and / or redistribute at will.
  5. */
  6.  
  7. #include <string.h>
  8. #include <stdint.h>
  9.  
  10. void * memset( void * s, int c, size_t n )
  11. {
  12.     unsigned char * p = ( unsigned char * ) s;
  13.  
  14.     while ( n-- )
  15.     {
  16.         *p++ = ( unsigned char ) c;
  17.     }
  18.  
  19.     return s;
  20. }