-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
| 935 | } |
| 936 | /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ |
| 937 | static void iiCleanProcs(idhdl &root) |
| 938 | { |
| 939 | idhdl prev=NULL; |
| 940 | loop |
| 941 | { |
| 942 | if (root==NULL) return; |
| 943 | if (IDTYP(root)==PROC_CMD) |
| 944 | { |
| 945 | procinfo *pi=(procinfo*)IDDATA(root); |
| 946 | if ((pi->language == LANG_SINGULAR) |
| 947 | && (pi->data.s.body_start == 0L)) |
| 948 | { |
| 949 | // procinfo data incorrect: |
| 950 | // - no proc body can start at the beginning of the file |
| 951 | killhdl(root); |
| 952 | if (prev==NULL) |
| 953 | root=IDROOT; |
| 954 | else |
| 955 | { |
| 956 | root=prev; |
| 957 | prev=NULL; |
| 958 | } |
| 959 | continue; |
| 960 | } |
| 961 | } |
| 962 | prev=root; |
| 963 | root=IDNEXT(root); |
| 964 | } |
| 965 | } |
| 966 | static void iiRunInit(package p) |
| 967 | { |
| 968 | idhdl h=p->idroot->get("mod_init",0); |