| 747 | } |
| 748 | |
| 749 | BOOLEAN piKill(procinfov pi) |
| 750 | { |
| 751 | (pi->ref)--; |
| 752 | if (pi->ref == 0) |
| 753 | { |
| 754 | if (pi->language==LANG_SINGULAR) |
| 755 | { |
| 756 | Voice *p=currentVoice; |
| 757 | while (p!=NULL) |
| 758 | { |
| 759 | if (p->pi==pi && pi->ref <= 1) |
| 760 | { |
| 761 | Warn("`%s` in use, can not be killed",pi->procname); |
| 762 | return TRUE; |
| 763 | } |
| 764 | p=p->next; |
| 765 | } |
| 766 | } |
| 767 | if (pi->libname != NULL) // OB: ???? |
| 768 | omFreeBinAddr((ADDRESS)pi->libname); |
| 769 | if (pi->procname != NULL) // OB: ???? |
| 770 | omFreeBinAddr((ADDRESS)pi->procname); |
| 771 | |
| 772 | if( pi->language == LANG_SINGULAR) |
| 773 | { |
| 774 | if (pi->data.s.body != NULL) // OB: ???? |
| 775 | omFree((ADDRESS)pi->data.s.body); |
| 776 | } |
| 777 | if( pi->language == LANG_C) |
| 778 | { |
| 779 | } |
| 780 | memset((void *) pi, 0, sizeof(procinfo)); |
| 781 | //pi->language=LANG_NONE; |
| 782 | omFreeBin((ADDRESS)pi, procinfo_bin); |
| 783 | } |
| 784 | return FALSE; |
| 785 | } |
| 786 | |
| 787 | void paCleanUp(package pack) |
| 788 | { |
no test coverage detected