home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Exec 5
/
CD_Magazyn_EXEC_nr_5.iso
/
Recent
/
comm
/
mail
/
YAM23src.lha
/
Source
/
extrasrc
/
stccpy.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-12-15
|
296b
|
14 lines
#include "extra.h"
/* Copy the q to the n chars buffer pointed by p.
The result is null terminated.
Returns the number of copied bytes, including '\0'. */
int stccpy(char *p, const char *q, int n)
{
char *t = p;
while ((*p++ = *q++) && --n > 0);
p[-1] = '\0';
return p - t;
}