Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use strchr() to improve the performance of defossilize(). |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0aaefeaba1bbca5811b7e4cb946eb2f1 |
User & Date: | drh 2019-09-12 17:11:07.122 |
Context
2019-09-12
| ||
17:51 | Add the optimized file_is_simple_pathname_nonstrict() as an alternative to file_is_simple_pathname() when parsing manifests. ... (check-in: b4aadf2cea user: drh tags: trunk) | |
17:11 | Use strchr() to improve the performance of defossilize(). ... (check-in: 0aaefeaba1 user: drh tags: trunk) | |
16:51 | Use strspn() to improve the performance of validate16(). ... (check-in: c550d6e021 user: drh tags: trunk) | |
Changes
Changes to src/encode.c.
︙ | ︙ | |||
312 313 314 315 316 317 318 | } /* ** Decode a fossilized string in-place. */ void defossilize(char *z){ int i, j, c; | | | > | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | } /* ** Decode a fossilized string in-place. */ void defossilize(char *z){ int i, j, c; char *zSlash = strchr(z, '\\'); if( zSlash==0 ) return; i = zSlash - z; for(j=i; (c=z[i])!=0; i++){ if( c=='\\' && z[i+1] ){ i++; switch( z[i] ){ case 'n': c = '\n'; break; case 's': c = ' '; break; case 't': c = '\t'; break; |
︙ | ︙ |