repo.or.cz
/
syslinux-debian
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add memtest support.
[syslinux-debian/hramrach.git]
/
com32
/
lib
/
strncpy.c
blob
0eda791ecdf4371b449df4b09562f884992705c7
1
/*
2
* strncpy.c
3
*
4
* strncpy()
5
*/
6
7
#include <string.h>
8
9
char
*
strncpy
(
char
*
dst
,
const char
*
src
,
size_t
n
)
10
{
11
char
*
q
=
dst
;
12
const char
*
p
=
src
;
13
char
ch
;
14
15
while
(
n
--) {
16
*
q
++ =
ch
= *
p
++;
17
if
(!
ch
)
18
break
;
19
}
20
21
return
dst
;
22
}