1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-25 02:26:22 -05:00
uemacs/util.c
Renaud Fivet 50b727bf7f Bindable functions take a boolean as flag.
Emphasize which one always return TRUE.
Use mloutfail() to introduce consistency when a function fails with error message.
2021-08-11 17:02:19 +08:00

21 lines
300 B
C

/* util.c -- implements util.h */
#include "util.h"
/* Safe zeroing, no complaining about overlap */
void mystrscpy( char *dst, const char *src, int size) {
if( size <= 0)
return ;
while( --size) {
char c = *src++ ;
if( !c)
break ;
*dst++ = c ;
}
*dst = 0 ;
}
/* end of util.c */