Overview
Comment: | reworked warning options and C standard |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7965556304e85db4f89fc0fc37150139 |
User & Date: | nnz on 2024-12-04 08:56:59 |
Other Links: | manifest | tags |
Context
2024-12-04
| ||
09:27 | use unsigned check-in: fe9956e07d user: nnz tags: trunk | |
08:56 | reworked warning options and C standard check-in: 7965556304 user: nnz tags: trunk | |
2024-12-03
| ||
21:04 | comment on conditional check-in: 9c47eb77fc user: nnz tags: trunk | |
Changes
Modified Makefile from [b36c017e36] to [c839dd71d7].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - - + + - - - - - + + - + + + - + + + + + + + + + + |
|
Modified aoc.c from [d7e84791d2] to [c6fa85498d].
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + - + | #define MAX_YEAR 2024 int main(int argc, char **argv) { int y = 0, d = 0; char dataname[99]; if (argc >= 3) { char *err; |
︙ |
Modified aoc2024.c from [c69db65f02] to [57ed145cda].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + + | #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "aocutils.h" |
︙ | |||
24 25 26 27 28 29 30 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - + | while (dontrite && (mul > dontrite)) { dontleft = dontrite; dontrite = strstr(dontrite + 1, "don't()"); } rest = mul + 4; if (isdigit((unsigned char)rest[0])) { char *err; |
︙ | |||
71 72 73 74 75 76 77 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + + | v[swap] = v[0]; // swap(1, 0): b-acde v[0] = tmp; // swap(2, 0): c-abde if (safereport(v + 1, nv - 1)) return 1; // swap(3, 0): d-abce } // ... and so on return 0; } |
︙ | |||
98 99 100 101 102 103 104 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - - + + + - - - + + + - + - - + + - - + + - - - + + + - + - - + + - + - + - - + + - - + + - - + + - + | return *(const int *)a - *(const int *)b; } #ifdef LISTSIZE # error LISTSIZE already defined #endif #define LISTSIZE 1200 |
Modified aocutils.c from [9c6f5027fe] to [4e3d9f66a2].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + - + | #include <stdio.h> #include <stdlib.h> #include "aocutils.h" int text2array(int **dst, const char *r) { int *a = malloc(sizeof *a); |
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - + | 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; |
︙ |