Differences From:
File
src/printf.c
part of check-in
[0c78ba2eb4]
- s/strnlen/strnlen_/g for the local strnlen impementation because the name fataly collides with a func from standard headers in some gcc versions (e.g. GnuSolaris/Nexenta w/ gcc 4.0.x).
by
stephan on
2008-04-25 21:45:41.
[view]
To:
File
src/printf.c
part of check-in
[9a8fdf7294]
- Change the name of the strnlen_() function in printf.c to StrNLen32().
by
drh on
2009-12-18 21:38:19.
Also file
src/printf.c
part of check-in
[76bc05d739]
- merge with trunk
by
btheado on
2009-12-30 20:33:59.
[view]
@@ -154,9 +154,9 @@
** exceed N bytes. If no zero terminator is seen in the first
** N bytes then return N. If N is negative, then this routine
** is an alias for strlen().
*/
-static int strnlen_(const char *z, int N){
+static int StrNLen32(const char *z, int N){
int n = 0;
while( (N-- != 0) && *(z++)!=0 ){ n++; }
return n;
}
@@ -564,9 +564,9 @@
int i;
int limit = flag_alternateform ? va_arg(ap,int) : -1;
char *e = va_arg(ap,char*);
if( e==0 ){e="";}
- length = strnlen_(e, limit);
+ length = StrNLen32(e, limit);
zExtra = bufpt = malloc(length+1);
for( i=0; i<length; i++ ){
if( e[i]=='\\' ){
bufpt[i]='/';
@@ -585,9 +585,9 @@
bufpt = "";
}else if( xtype==etDYNSTRING ){
zExtra = bufpt;
}
- length = strnlen_(bufpt, limit);
+ length = StrNLen32(bufpt, limit);
if( precision>=0 && precision<length ) length = precision;
break;
}
case etBLOB: {