summaryrefslogtreecommitdiff
path: root/firmware/common/memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/common/memset.c')
-rw-r--r--firmware/common/memset.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/firmware/common/memset.c b/firmware/common/memset.c
index c370191cda..6c4a66bf13 100644
--- a/firmware/common/memset.c
+++ b/firmware/common/memset.c
@@ -1,28 +1,28 @@
1/* 1/*
2FUNCTION 2FUNCTION
3 <<memset>>---set an area of memory 3 <<memset>>---set an area of memory
4 4
5INDEX 5INDEX
6 memset 6 memset
7 7
8ANSI_SYNOPSIS 8ANSI_SYNOPSIS
9 #include <string.h> 9 #include <string.h>
10 void *memset(const void *<[dst]>, int <[c]>, size_t <[length]>); 10 void *memset(const void *<[dst]>, int <[c]>, size_t <[length]>);
11 11
12TRAD_SYNOPSIS 12TRAD_SYNOPSIS
13 #include <string.h> 13 #include <string.h>
14 void *memset(<[dst]>, <[c]>, <[length]>) 14 void *memset(<[dst]>, <[c]>, <[length]>)
15 void *<[dst]>; 15 void *<[dst]>;
16 int <[c]>; 16 int <[c]>;
17 size_t <[length]>; 17 size_t <[length]>;
18 18
19DESCRIPTION 19DESCRIPTION
20 This function converts the argument <[c]> into an unsigned 20 This function converts the argument <[c]> into an unsigned
21 char and fills the first <[length]> characters of the array 21 char and fills the first <[length]> characters of the array
22 pointed to by <[dst]> to the value. 22 pointed to by <[dst]> to the value.
23 23
24RETURNS 24RETURNS
25 <<memset>> returns the value of <[m]>. 25 <<memset>> returns the value of <[m]>.
26 26
27PORTABILITY 27PORTABILITY
28<<memset>> is ANSI C. 28<<memset>> is ANSI C.
@@ -30,7 +30,7 @@ PORTABILITY
30 <<memset>> requires no supporting OS subroutines. 30 <<memset>> requires no supporting OS subroutines.
31 31
32QUICKREF 32QUICKREF
33 memset ansi pure 33 memset ansi pure
34*/ 34*/
35 35
36#include <string.h> 36#include <string.h>
@@ -41,9 +41,9 @@ QUICKREF
41 41
42_PTR 42_PTR
43_DEFUN (memset, (m, c, n), 43_DEFUN (memset, (m, c, n),
44 _PTR m _AND 44 _PTR m _AND
45 int c _AND 45 int c _AND
46 size_t n) 46 size_t n)
47{ 47{
48#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) 48#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
49 char *s = (char *) m; 49 char *s = (char *) m;
@@ -78,7 +78,7 @@ _DEFUN (memset, (m, c, n),
78 { 78 {
79 buffer = 0; 79 buffer = 0;
80 for (i = 0; i < LBLOCKSIZE; i++) 80 for (i = 0; i < LBLOCKSIZE; i++)
81 buffer = (buffer << 8) | c; 81 buffer = (buffer << 8) | c;
82 } 82 }
83 83
84 while (n >= LBLOCKSIZE*4) 84 while (n >= LBLOCKSIZE*4)