mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
18 lines
234 B
C
18 lines
234 B
C
|
#include "util.h"
|
||
|
|
||
|
/* Safe zeroing, no complaining about overlap */
|
||
|
void mystrscpy(char *dst, const char *src, int size)
|
||
|
{
|
||
|
if (!size)
|
||
|
return;
|
||
|
while (--size) {
|
||
|
char c = *src++;
|
||
|
if (!c)
|
||
|
break;
|
||
|
*dst++ = c;
|
||
|
}
|
||
|
*dst = 0;
|
||
|
}
|
||
|
|
||
|
|