-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
-
-void * memset( void * s, int c, size_t n ) { /* TODO */ };
+/* $Id$ */
+
+/* Release $Name$ */
+
+/* memset( void *, int, size_t )
+
+ This file is part of the Public Domain C Library (PDCLib).
+ Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#include <string.h>
+
+void * memset( void * s, int c, size_t n )
+{
+ unsigned char * p = (unsigned char *) s;
+ while ( n-- )
+ {
+ *p++ = (unsigned char) c;
+ }
+ return s;
+}
+
+#warning Test driver missing.
+
+#ifdef TEST
+int main()
+{
+ return 0;
+}
+#endif