Overview
Comment: | comment about 13/8 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b4c322283a05712feba5f5ea5b7afcb4 |
User & Date: | nnz on 2024-12-03 15:21:45 |
Other Links: | manifest | tags |
Context
2024-12-03
| ||
16:48 | added versionable fossil settings check-in: 095436466b user: nnz tags: trunk | |
15:21 | comment about 13/8 check-in: b4c322283a user: nnz tags: trunk | |
14:56 | comment inside command check-in: e5bb3b830c user: nnz tags: trunk | |
Changes
Modified aocutils.c from [abd0f6ad4b] to [9c6f5027fe].
︙ | ︙ | |||
37 38 39 40 41 42 43 | int ch; char *tmp = malloc(512); size_t s = 512; size_t r = 0; while ((ch = fgetc(h)) != EOF) { if (r == s) { //grow tmp | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | int ch; char *tmp = malloc(512); size_t s = 512; size_t r = 0; while ((ch = fgetc(h)) != EOF) { if (r == s) { //grow tmp char *ttmp = realloc(tmp, (13*s)/8); // 13/8 is within 0.5% of the golden ratio if (ttmp) { tmp = ttmp; s = (13*s)/8; } else { free(tmp); return 0; } |
︙ | ︙ |