MCPcopy Create free account
hub / github.com/Singular/Singular / newstruct_Print

Function newstruct_Print

Singular/newstruct.cc:670–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668}
669
670void 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}
699void newstruct_setup(const char *n, newstruct_desc d )
700{
701 blackbox *b=(blackbox*)omAlloc0(sizeof(blackbox));

Callers

nothing calls this directly

Calls 8

newstruct_CopyFunction · 0.85
iiMake_procFunction · 0.85
WarnFunction · 0.85
blackbox_default_PrintFunction · 0.85
CleanUpMethod · 0.80
Tok2CmdnameFunction · 0.70
InitMethod · 0.45
TypMethod · 0.45

Tested by

no test coverage detected