source: cmedia/trunk/Lib32/strncpy.c@ 559

Last change on this file since 559 was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 449 bytes
Line 
1/* $Id: strncpy.c,v 1.1 2000/04/23 14:55:39 ktk Exp $ */
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.