From: kosako Date: Mon, 18 Apr 2016 05:14:33 +0000 (+0900) Subject: remove xstrncat and define xstrcat X-Git-Tag: v6.0.0^2~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48181ca40eaa1e5707d119ff451c7a8197f631cd;p=onig remove xstrncat and define xstrcat --- diff --git a/src/regerror.c b/src/regerror.c index ca17e1d..a36c5bf 100644 --- a/src/regerror.c +++ b/src/regerror.c @@ -339,7 +339,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) need = (pat_end - pat) * 4 + 4; if (n + need < bufsize) { - xstrncat((char* )buf, ": /", bufsize); + xstrcat((char* )buf, ": /", bufsize); s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf); p = pat; diff --git a/src/regint.h b/src/regint.h index daecf70..5476626 100644 --- a/src/regint.h +++ b/src/regint.h @@ -130,12 +130,12 @@ #define xalloca _alloca #define xvsnprintf(buf,size,fmt,args) _vsnprintf_s(buf,size,_TRUNCATE,fmt,args) #define xsnprintf sprintf_s -#define xstrncat(dest,src,n) strcat_s(dest,n,src) +#define xstrcat(dest,src,size) strcat_s(dest,size,src) #else #define xalloca alloca #define xvsnprintf vsnprintf #define xsnprintf snprintf -#define xstrncat(dest,src,n) strncat(dest,src,n) +#define xstrcat(dest,src,size) strcat(dest,src) #endif