Load tz data from the file named NAME into *SP. Respect TZLOADFLAGS. Return 0 on success, an errno value on failure. */
| 1311 | /* Load tz data from the file named NAME into *SP. Respect TZLOADFLAGS. |
| 1312 | Return 0 on success, an errno value on failure. */ |
| 1313 | static int |
| 1314 | tzload(char const *name, struct state *sp, char tzloadflags) |
| 1315 | { |
| 1316 | int r; |
| 1317 | union local_storage *lsp0; |
| 1318 | union local_storage *lsp; |
| 1319 | #if ALL_STATE |
| 1320 | lsp = NULL; |
| 1321 | #else |
| 1322 | union local_storage ls; |
| 1323 | lsp = &ls; |
| 1324 | #endif |
| 1325 | lsp0 = lsp; |
| 1326 | r = tzloadbody(name, sp, tzloadflags, &lsp); |
| 1327 | if (lsp != lsp0) |
| 1328 | free(lsp); |
| 1329 | return r; |
| 1330 | } |
| 1331 | |
| 1332 | static const int mon_lengths[2][MONSPERYEAR] = { |
| 1333 | { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, |
no test coverage detected