Mercurial > hg > octave-lojdl > gnulib-hg
annotate lib/memset.c @ 16358:a712776b11ce
maint: spelling fixes
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 05 Feb 2012 13:42:03 -0800 |
parents | 8250f2777afc |
children | bb182ee4a09d |
rev | line source |
---|---|
14 | 1 /* memset.c -- set an area of memory to a given value |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
15945
diff
changeset
|
2 Copyright (C) 1991, 2003, 2009-2012 Free Software Foundation, Inc. |
14 | 3 |
4 This program is free software; you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
6 the Free Software Foundation; either version 2, or (at your option) | |
7 any later version. | |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
649
89f4c1937ac7
update FSF address in copyright and remove any trailing blanks
Jim Meyering <jim@meyering.net>
parents:
14
diff
changeset
|
15 along with this program; if not, write to the Free Software Foundation, |
5848
a48fb0e98c8c
*** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents:
4664
diff
changeset
|
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ |
14 | 17 |
15945
f914ec364e88
ffs, bcopy, memset: Support symbol renaming via config.h.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
18 #include <config.h> |
f914ec364e88
ffs, bcopy, memset: Support symbol renaming via config.h.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
19 |
4664 | 20 #include <stddef.h> |
21 | |
22 void * | |
23 memset (void *str, int c, size_t len) | |
14 | 24 { |
25 register char *st = str; | |
26 | |
27 while (len-- > 0) | |
28 *st++ = c; | |
29 return str; | |
30 } |