Go to the source code of this file.
int newstruct_desc_size |
( |
| ) |
|
Definition at line 849 of file newstruct.cc.
855 Werror(
">>%s<< is not a newstruct type",bbname);
859 newstruct_desc desc=(newstruct_desc)bb->data;
860 newstruct_proc p=(newstruct_proc)
omAlloc(
sizeof(*p));
861 p->next=desc->procs; desc->procs=
p;
867 if(!(tt=
IsCmd(func,p->t)))
887 Werror(
">>%s<< is not a kernel command",func);
#define omFreeSize(addr, size)
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
int iiOpsTwoChar(const char *s)
void Werror(const char *fmt,...)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
int IsCmd(const char *n, int &tok)
void newstruct_setup |
( |
const char * |
name, |
|
|
newstruct_desc |
d |
|
) |
| |
Definition at line 692 of file newstruct.cc.
694 blackbox *
b=(blackbox*)
omAlloc0(
sizeof(blackbox));
BOOLEAN newstruct_deserialize(blackbox **b, void **d, si_link f)
BOOLEAN newstruct_Op1(int op, leftv res, leftv arg)
void newstruct_destroy(blackbox *, void *d)
BOOLEAN newstruct_OpM(int op, leftv res, leftv args)
BOOLEAN newstruct_Op2(int op, leftv res, leftv a1, leftv a2)
void * newstruct_Init(blackbox *b)
BOOLEAN newstruct_serialize(blackbox *b, void *d, si_link f)
BOOLEAN newstruct_Assign(leftv l, leftv r)
char * newstruct_String(blackbox *b, void *d)
void * newstruct_Copy(blackbox *, void *d)
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
void newstruct_Print(blackbox *b, void *d)
BOOLEAN newstruct_CheckAssign(blackbox *, leftv L, leftv R)
newstruct_desc newstructChildFromString |
( |
const char * |
p, |
|
|
const char * |
s |
|
) |
| |
Definition at line 802 of file newstruct.cc.
809 Werror(
">>%s< not found",parent);
816 Werror(
">>%s< is not a user defined type",parent);
820 newstruct_desc
res=(newstruct_desc)
omAlloc0(
sizeof(*res));
821 newstruct_desc parent_desc=(newstruct_desc)parent_bb->data;
822 res->size=parent_desc->size;
823 res->member=parent_desc->member;
824 res->parent=parent_desc;
const CanonicalForm int s
void newstruct_destroy(blackbox *, void *d)
static newstruct_desc scanNewstructFromString(const char *s, newstruct_desc res)
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
void Werror(const char *fmt,...)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
newstruct_desc newstructFromString |
( |
const char * |
s | ) |
|
Definition at line 795 of file newstruct.cc.
797 newstruct_desc
res=(newstruct_desc)
omAlloc0(
sizeof(*res));
const CanonicalForm int s
static newstruct_desc scanNewstructFromString(const char *s, newstruct_desc res)
void newstructShow |
( |
newstruct_desc |
d | ) |
|
Definition at line 829 of file newstruct.cc.
831 newstruct_member elem;
832 Print(
"id: %d\n",d->id);
836 Print(
">>%s<< at pos %d, type %d (%s)\n",elem->name,elem->pos,elem->typ,
Tok2Cmdname(elem->typ));
838 Print(
">>r_%s<< at pos %d, shadow ring\n",elem->name,elem->pos-1);
841 newstruct_proc
p=d->procs;
844 Print(
"op:%d(%s) with %d args -> %s\n",p->t,
iiTwoOps(p->t),p->args,p->p->procname);
const char * iiTwoOps(int t)
const char * Tok2Cmdname(int tok)