| 1390 | } while (is_digit(c)); |
| 1391 | if (num < min) |
| 1392 | return NULL; /* illegal value */ |
| 1393 | *nump = num; |
| 1394 | return strp; |
| 1395 | } |
| 1396 | |
| 1397 | /* |
| 1398 | ** Given a pointer into a timezone string, extract a number of seconds, |
| 1399 | ** in hh[:mm[:ss]] form, from the string. |
| 1400 | ** If any error occurs, return NULL. |
| 1401 | ** Otherwise, return a pointer to the first character not part of the number |
| 1402 | ** of seconds. |
| 1403 | */ |
| 1404 | |
| 1405 | static const char * |
| 1406 | getsecs(register const char *strp, int_fast32_t *const secsp) |
| 1407 | { |
| 1408 | int num; |
| 1409 | int_fast32_t secsperhour = SECSPERHOUR; |
| 1410 | |
| 1411 | /* |
| 1412 | ** 'HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-POSIX rules like |
| 1413 | ** "M10.4.6/26", which does not conform to POSIX, |
| 1414 | ** but which specifies the equivalent of |