| 1602 | `------------------------------------------------------------------------*/ |
| 1603 | |
| 1604 | static void |
| 1605 | generate_all_output (void) |
| 1606 | { |
| 1607 | OCCURS *occurs_cursor; /* current keyword entry being processed */ |
| 1608 | |
| 1609 | /* The following assignments are useful to provide default values in case |
| 1610 | line contexts or references are not used, in which case these variables |
| 1611 | would never be computed. */ |
| 1612 | |
| 1613 | tail.start = NULL; |
| 1614 | tail.end = NULL; |
| 1615 | tail_truncation = false; |
| 1616 | |
| 1617 | head.start = NULL; |
| 1618 | head.end = NULL; |
| 1619 | head_truncation = false; |
| 1620 | |
| 1621 | /* Loop over all keyword occurrences. */ |
| 1622 | |
| 1623 | occurs_cursor = occurs_table[0]; |
| 1624 | |
| 1625 | for (idx_t occurs_index = 0; occurs_index < number_of_occurs[0]; |
| 1626 | occurs_index++) |
| 1627 | { |
| 1628 | /* Compute the exact size of every field and whenever truncation flags |
| 1629 | are present or not. */ |
| 1630 | |
| 1631 | define_all_fields (occurs_cursor); |
| 1632 | |
| 1633 | /* Produce one output line according to selected format. */ |
| 1634 | |
| 1635 | switch (output_format) |
| 1636 | { |
| 1637 | case UNKNOWN_FORMAT: |
| 1638 | /* Should never happen. */ |
| 1639 | |
| 1640 | case DUMB_FORMAT: |
| 1641 | output_one_dumb_line (); |
| 1642 | break; |
| 1643 | |
| 1644 | case ROFF_FORMAT: |
| 1645 | output_one_roff_line (); |
| 1646 | break; |
| 1647 | |
| 1648 | case TEX_FORMAT: |
| 1649 | output_one_tex_line (); |
| 1650 | break; |
| 1651 | } |
| 1652 | |
| 1653 | /* Advance the cursor into the occurs table. */ |
| 1654 | |
| 1655 | occurs_cursor++; |
| 1656 | } |
| 1657 | } |
| 1658 | |
| 1659 | /* Option decoding and main program. */ |
| 1660 |
no test coverage detected