Fossil SCM
Change the name of the strnlen_() function in printf.c to StrNLen32().
Commit
9a8fdf7294825aaf24f0e415c443c709ef6d1177
Parent
73b7faa58b4b457…
1 file changed
+3
-3
+3
-3
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -153,11 +153,11 @@ | ||
| 153 | 153 | ** Find the length of a string as long as that length does not |
| 154 | 154 | ** exceed N bytes. If no zero terminator is seen in the first |
| 155 | 155 | ** N bytes then return N. If N is negative, then this routine |
| 156 | 156 | ** is an alias for strlen(). |
| 157 | 157 | */ |
| 158 | -static int strnlen_(const char *z, int N){ | |
| 158 | +static int StrNLen32(const char *z, int N){ | |
| 159 | 159 | int n = 0; |
| 160 | 160 | while( (N-- != 0) && *(z++)!=0 ){ n++; } |
| 161 | 161 | return n; |
| 162 | 162 | } |
| 163 | 163 | |
| @@ -563,11 +563,11 @@ | ||
| 563 | 563 | case etPATH: { |
| 564 | 564 | int i; |
| 565 | 565 | int limit = flag_alternateform ? va_arg(ap,int) : -1; |
| 566 | 566 | char *e = va_arg(ap,char*); |
| 567 | 567 | if( e==0 ){e="";} |
| 568 | - length = strnlen_(e, limit); | |
| 568 | + length = StrNLen32(e, limit); | |
| 569 | 569 | zExtra = bufpt = malloc(length+1); |
| 570 | 570 | for( i=0; i<length; i++ ){ |
| 571 | 571 | if( e[i]=='\\' ){ |
| 572 | 572 | bufpt[i]='/'; |
| 573 | 573 | }else{ |
| @@ -584,11 +584,11 @@ | ||
| 584 | 584 | if( bufpt==0 ){ |
| 585 | 585 | bufpt = ""; |
| 586 | 586 | }else if( xtype==etDYNSTRING ){ |
| 587 | 587 | zExtra = bufpt; |
| 588 | 588 | } |
| 589 | - length = strnlen_(bufpt, limit); | |
| 589 | + length = StrNLen32(bufpt, limit); | |
| 590 | 590 | if( precision>=0 && precision<length ) length = precision; |
| 591 | 591 | break; |
| 592 | 592 | } |
| 593 | 593 | case etBLOB: { |
| 594 | 594 | int limit = flag_alternateform ? va_arg(ap, int) : -1; |
| 595 | 595 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -153,11 +153,11 @@ | |
| 153 | ** Find the length of a string as long as that length does not |
| 154 | ** exceed N bytes. If no zero terminator is seen in the first |
| 155 | ** N bytes then return N. If N is negative, then this routine |
| 156 | ** is an alias for strlen(). |
| 157 | */ |
| 158 | static int strnlen_(const char *z, int N){ |
| 159 | int n = 0; |
| 160 | while( (N-- != 0) && *(z++)!=0 ){ n++; } |
| 161 | return n; |
| 162 | } |
| 163 | |
| @@ -563,11 +563,11 @@ | |
| 563 | case etPATH: { |
| 564 | int i; |
| 565 | int limit = flag_alternateform ? va_arg(ap,int) : -1; |
| 566 | char *e = va_arg(ap,char*); |
| 567 | if( e==0 ){e="";} |
| 568 | length = strnlen_(e, limit); |
| 569 | zExtra = bufpt = malloc(length+1); |
| 570 | for( i=0; i<length; i++ ){ |
| 571 | if( e[i]=='\\' ){ |
| 572 | bufpt[i]='/'; |
| 573 | }else{ |
| @@ -584,11 +584,11 @@ | |
| 584 | if( bufpt==0 ){ |
| 585 | bufpt = ""; |
| 586 | }else if( xtype==etDYNSTRING ){ |
| 587 | zExtra = bufpt; |
| 588 | } |
| 589 | length = strnlen_(bufpt, limit); |
| 590 | if( precision>=0 && precision<length ) length = precision; |
| 591 | break; |
| 592 | } |
| 593 | case etBLOB: { |
| 594 | int limit = flag_alternateform ? va_arg(ap, int) : -1; |
| 595 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -153,11 +153,11 @@ | |
| 153 | ** Find the length of a string as long as that length does not |
| 154 | ** exceed N bytes. If no zero terminator is seen in the first |
| 155 | ** N bytes then return N. If N is negative, then this routine |
| 156 | ** is an alias for strlen(). |
| 157 | */ |
| 158 | static int StrNLen32(const char *z, int N){ |
| 159 | int n = 0; |
| 160 | while( (N-- != 0) && *(z++)!=0 ){ n++; } |
| 161 | return n; |
| 162 | } |
| 163 | |
| @@ -563,11 +563,11 @@ | |
| 563 | case etPATH: { |
| 564 | int i; |
| 565 | int limit = flag_alternateform ? va_arg(ap,int) : -1; |
| 566 | char *e = va_arg(ap,char*); |
| 567 | if( e==0 ){e="";} |
| 568 | length = StrNLen32(e, limit); |
| 569 | zExtra = bufpt = malloc(length+1); |
| 570 | for( i=0; i<length; i++ ){ |
| 571 | if( e[i]=='\\' ){ |
| 572 | bufpt[i]='/'; |
| 573 | }else{ |
| @@ -584,11 +584,11 @@ | |
| 584 | if( bufpt==0 ){ |
| 585 | bufpt = ""; |
| 586 | }else if( xtype==etDYNSTRING ){ |
| 587 | zExtra = bufpt; |
| 588 | } |
| 589 | length = StrNLen32(bufpt, limit); |
| 590 | if( precision>=0 && precision<length ) length = precision; |
| 591 | break; |
| 592 | } |
| 593 | case etBLOB: { |
| 594 | int limit = flag_alternateform ? va_arg(ap, int) : -1; |
| 595 |