source: buchla-68k/libsm/strccpy.c@ 0580615

Last change on this file since 0580615 was 0580615, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Point of no return.

  • Property mode set to 100644
File size: 865 bytes
Line 
1/*
2 =============================================================================
3 strccpy.c -- copy string up to specified character
4 Version 1 -- 1987-04-03 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8/*
9 =============================================================================
10 strccpy(s1, s2, c) -- copy string up to specified character
11
12 Copy string s2 to s1 up to but not including the first occurrence of c.
13 s1 must be large enough to contain the copied bytes.
14 No checking is done. Character c is not copied. Returns s1.
15 =============================================================================
16 */
17
18char *strccpy(char *s1, char *s2, char c)
19{
20 register char *os1;
21 register char x;
22
23 os1 = s1;
24
25 while(c != (x = *s1++))
26 *s2++ = x;
27
28 return(os1);
29}
Note: See TracBrowser for help on using the repository browser.