| 597 | } |
| 598 | |
| 599 | static void __parse_tzdata(tzdb& __db, __tz::__rules_storage_type& __rules, istream& __input) { |
| 600 | while (true) { |
| 601 | int __c = std::tolower(__input.get()); |
| 602 | |
| 603 | switch (__c) { |
| 604 | case istream::traits_type::eof(): |
| 605 | return; |
| 606 | |
| 607 | case ' ': |
| 608 | case '\t': |
| 609 | case '\n': |
| 610 | break; |
| 611 | |
| 612 | case '#': |
| 613 | chrono::__skip_line(__input); |
| 614 | break; |
| 615 | |
| 616 | case 'r': |
| 617 | chrono::__skip(__input, "ule"); |
| 618 | chrono::__parse_rule(__db, __rules, __input); |
| 619 | break; |
| 620 | |
| 621 | case 'z': |
| 622 | chrono::__skip(__input, "one"); |
| 623 | chrono::__parse_zone(__db, __rules, __input); |
| 624 | break; |
| 625 | |
| 626 | case 'l': |
| 627 | chrono::__skip(__input, "ink"); |
| 628 | chrono::__parse_link(__db, __input); |
| 629 | break; |
| 630 | |
| 631 | default: |
| 632 | std::__throw_runtime_error("corrupt tzdb: unexpected input"); |
| 633 | } |
| 634 | } |
| 635 | } |
| 636 | |
| 637 | static void __parse_leap_seconds(vector<leap_second>& __leap_seconds, istream&& __input) { |
| 638 | // The file stores dates since 1 January 1900, 00:00:00, we want |
no test coverage detected