| 806 | |
| 807 | |
| 808 | void list::ordered_format_print(ofstream& output, const term_ordering& w) const |
| 809 | { |
| 810 | |
| 811 | #ifdef DL_LIST |
| 812 | |
| 813 | element* iter=start->next; |
| 814 | |
| 815 | #endif // DL_LIST |
| 816 | |
| 817 | #ifdef SL_LIST |
| 818 | |
| 819 | element *iter=start; |
| 820 | |
| 821 | #endif // SL_LIST |
| 822 | |
| 823 | if(iter==NULL) |
| 824 | { |
| 825 | cerr<<"\nWARNING: void list::ordered_format_print(const term_ordering&) " |
| 826 | "const:\n" |
| 827 | "cannot print corrupt list"<<endl; |
| 828 | output<<"\nWARNING: void list::ordered_format_print(const term_ordering&) " |
| 829 | "const:\n" |
| 830 | "cannot print corrupt list\n"<<endl; |
| 831 | return; |
| 832 | } |
| 833 | |
| 834 | list aux; |
| 835 | |
| 836 | while(iter->next!=NULL) |
| 837 | { |
| 838 | aux._ordered_insert(*(iter->entry),w); |
| 839 | iter=iter->next; |
| 840 | } |
| 841 | |
| 842 | aux.format_print(output); |
| 843 | |
| 844 | // delete aux, but only the element structs, not the binomials |
| 845 | // (these are still stored in the actual list!) |
| 846 | |
| 847 | #ifdef DL_LIST |
| 848 | |
| 849 | iter=(aux.start)->next; |
| 850 | |
| 851 | #endif // DL_LIST |
| 852 | |
| 853 | #ifdef SL_LIST |
| 854 | |
| 855 | |
| 856 | iter=aux.start; |
| 857 | |
| 858 | #endif |
| 859 | |
| 860 | |
| 861 | while((iter->next)!=NULL) |
| 862 | { |
| 863 | element* aux1=iter->next; |
| 864 | iter->next=iter->next->next; |
| 865 | delete aux1; |
no test coverage detected