source: sbliveos2/trunk/lib32/strncpy.c@ 562

Last change on this file since 562 was 142, checked in by ktk, 25 years ago

Import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 380 bytes
Line 
1/* $Id: strncpy.c 142 2000-04-23 14:55:46Z ktk $ */
2
3/* strncpy.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
4
5#include <string.h>
6
7char *strncpy (char *string1, const char *string2, size_t count)
8{
9 char *dst;
10
11 dst = string1;
12 while (count > 0 && *string2 != 0)
13 {
14 *dst++ = *string2++;
15 --count;
16 }
17 while (count > 0)
18 {
19 *dst++ = 0;
20 --count;
21 }
22 return string1;
23}
Note: See TracBrowser for help on using the repository browser.