version 1.86 | | version 1.87 |
---|
| | |
/* | | /* |
* static char *rcsid_define_h = | | * static char *rcsid_define_h = |
* "$Id: define.h,v 1.86 2005/05/29 17:35:53 tchize Exp $"; | | * "$Id: define.h,v 1.87 2005/08/12 13:46:34 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/* Simple function we use below to keep adding to the same string | | /* Simple function we use below to keep adding to the same string |
* but also make sure we don't overwrite that string. | | * but also make sure we don't overwrite that string. |
*/ | | */ |
static inline void safe_strcat(char *dest, char *orig, int *curlen, int maxlen) | | static inline void safe_strcat(char *dest, const char *orig, int *curlen, int maxlen) |
{ | | { |
if (*curlen == (maxlen-1)) return; | | if (*curlen == (maxlen-1)) return; |
strncpy(dest+*curlen, orig, maxlen-*curlen-1); | | strncpy(dest+*curlen, orig, maxlen-*curlen-1); |