strcpy.c (101887) | strcpy.c (103012) |
---|---|
1/* 2 * Copyright (c) 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#if defined(LIBC_SCCS) && !defined(lint) 35static char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93"; 36#endif /* LIBC_SCCS and not lint */ 37#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#if defined(LIBC_SCCS) && !defined(lint) 35static char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93"; 36#endif /* LIBC_SCCS and not lint */ 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/lib/libc/string/strcpy.c 101887 2002-08-14 22:59:22Z robert $"); | 38__FBSDID("$FreeBSD: head/lib/libc/string/strcpy.c 103012 2002-09-06 11:24:06Z tjr $"); |
39 40#include <string.h> 41 42char * | 39 40#include <string.h> 41 42char * |
43strcpy(char *__restrict to, const char *__restrict from) | 43strcpy(char * __restrict to, const char * __restrict from) |
44{ 45 char *save = to; 46 47 for (; (*to = *from); ++from, ++to); 48 return(save); 49} | 44{ 45 char *save = to; 46 47 for (; (*to = *from); ++from, ++to); 48 return(save); 49} |