| 668 | } |
| 669 | |
| 670 | void newstruct_Print(blackbox *b,void *d) |
| 671 | { |
| 672 | newstruct_desc dd=(newstruct_desc)b->data; |
| 673 | newstruct_proc p=dd->procs; |
| 674 | while((p!=NULL)&&(p->t!=PRINT_CMD)) |
| 675 | p=p->next; |
| 676 | if (p!=NULL) |
| 677 | { |
| 678 | BOOLEAN sl; |
| 679 | sleftv tmp; |
| 680 | tmp.Init(); |
| 681 | tmp.rtyp=dd->id; |
| 682 | tmp.data=(void*)newstruct_Copy(b,d); |
| 683 | idrec hh; |
| 684 | hh.Init(); |
| 685 | hh.id=Tok2Cmdname(p->t); |
| 686 | hh.typ=PROC_CMD; |
| 687 | hh.data.pinf=p->p; |
| 688 | sl=iiMake_proc(&hh,NULL,&tmp); |
| 689 | if (!sl) |
| 690 | { |
| 691 | if (iiRETURNEXPR.Typ()!=NONE) Warn("ignoring return value (%s)",Tok2Cmdname(iiRETURNEXPR.Typ())); |
| 692 | iiRETURNEXPR.CleanUp(); |
| 693 | } |
| 694 | iiRETURNEXPR.Init(); |
| 695 | } |
| 696 | else |
| 697 | blackbox_default_Print(b,d); |
| 698 | } |
| 699 | void newstruct_setup(const char *n, newstruct_desc d ) |
| 700 | { |
| 701 | blackbox *b=(blackbox*)omAlloc0(sizeof(blackbox)); |
nothing calls this directly
no test coverage detected