Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6557 serge 1
/*
2
FUNCTION
3
<>---initialize memory to zero
4
 
5
INDEX
6
	bzero
7
 
8
ANSI_SYNOPSIS
9
	#include 
10
	void bzero(void *<[b]>, size_t <[length]>);
11
 
12
TRAD_SYNOPSIS
13
	#include 
14
	void bzero(<[b]>, <[length]>)
15
	void *<[b]>;
16
	size_t <[length]>;
17
 
18
DESCRIPTION
19
<> initializes <[length]> bytes of memory, starting at address
20
<[b]>, to zero.
21
 
22
RETURNS
23
<> does not return a result.
24
 
25
PORTABILITY
26
<> is in the Berkeley Software Distribution.
27
Neither ANSI C nor the System V Interface Definition (Issue 2) require
28
<>.
29
 
30
<> requires no supporting OS subroutines.
31
*/
32
 
33
#include 
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
}