OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [string/] [bzero.c] - Blame information for rev 517

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

Line No. Rev Author Line
1 207 jeremybenn
/*
2
FUNCTION
3
<<bzero>>---initialize memory to zero
4
 
5
INDEX
6
        bzero
7
 
8
ANSI_SYNOPSIS
9
        #include <string.h>
10
        void bzero(void *<[b]>, size_t <[length]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <string.h>
14
        void bzero(<[b]>, <[length]>)
15
        void *<[b]>;
16
        size_t <[length]>;
17
 
18
DESCRIPTION
19
<<bzero>> initializes <[length]> bytes of memory, starting at address
20
<[b]>, to zero.
21
 
22
RETURNS
23
<<bzero>> does not return a result.
24
 
25
PORTABILITY
26
<<bzero>> is in the Berkeley Software Distribution.
27
Neither ANSI C nor the System V Interface Definition (Issue 2) require
28
<<bzero>>.
29
 
30
<<bzero>> requires no supporting OS subroutines.
31
*/
32
 
33
#include <string.h>
34
 
35
_VOID
36
_DEFUN (bzero, (b, length),
37
        void *b _AND
38
        size_t length)
39
{
40
  char *ptr = (char *)b;
41
  while (length--)
42
    *ptr++ = 0;
43
}

powered by: WebSVN 2.1.0

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