OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [libiberty/] [memset.c] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/* memset
2
   This implementation is in the public domain.  */
3
 
4
#include <ansidecl.h>
5
#ifdef __STDC__
6
#include <stddef.h>
7
#else
8
#define size_t unsigned long
9
#endif
10
 
11
PTR
12
DEFUN(memset, (dest, val, len),
13
      PTR dest AND register int val AND register size_t len)
14
{
15
  register unsigned char *ptr = (unsigned char*)dest;
16
  while (len-- > 0)
17
    *ptr++ = val;
18
  return dest;
19
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.