projects
/
kopensolaris-gnu
/
glibc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
(i[34]86sol2): New abbrev for i[34]86-unknown-solaris2.
[kopensolaris-gnu/glibc.git]
/
mach
/
mig_strncpy.c
1
/* Silly pointless function MiG needs. */
2
3
#include <ansidecl.h>
4
#include <string.h>
5
6
int
7
__mig_strncpy (char *dest, char *src, size_t len)
8
{
9
size_t i;
10
11
if (len == 0)
12
return 0;
13
14
for (i = 1; i < len; ++i)
15
if ((*dest++ = *src++) == '\0')
16
return i;
17
18
*dest = '\0';
19
return i;
20
}