Commit | Line | Data |
---|---|---|
7bbdb8c5 RE |
1 | /* |
2 | * Copyright (c) 1985 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
7 | /* | |
8 | * Sys5 compat routine | |
9 | */ | |
10 | ||
11 | #ifndef lint | |
12 | static char sccsid[] = "@(#)memccpy.c 5.1 (Berkeley) 85/08/05"; | |
13 | #endif | |
14 | ||
15 | ||
16 | char * | |
17 | memccpy(t, f, c, n) | |
18 | register char *t, *f; | |
19 | register c, n; | |
20 | { | |
21 | while (--n >= 0) | |
22 | if ((*t++ = *f++) == c) | |
23 | return (t); | |
24 | return (0); | |
25 | } |