1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-11-10 14:36:13 -05:00
uemacs/util.c

18 lines
234 B
C
Raw Normal View History

2019-06-19 07:49:20 -04:00
#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;
}