Go to the source code of this file.
§ newstruct_desc_size()
int newstruct_desc_size |
( |
| ) |
|
§ newstruct_set_proc()
Definition at line 850 of file newstruct.cc.
856 Werror(
">>%s<< is not a newstruct type",bbname);
860 newstruct_desc desc=(newstruct_desc)bb->data;
861 newstruct_proc p=(newstruct_proc)
omAlloc(
sizeof(*p));
862 p->next=desc->procs; desc->procs=
p;
868 if(!(tt=
IsCmd(func,p->t)))
888 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)
§ newstruct_setup()
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)
§ newstructChildFromString()
newstruct_desc newstructChildFromString |
( |
const char * |
p, |
|
|
const char * |
s |
|
) |
| |
Definition at line 803 of file newstruct.cc.
810 Werror(
">>%s< not found",parent);
817 Werror(
">>%s< is not a user defined type",parent);
821 newstruct_desc
res=(newstruct_desc)
omAlloc0(
sizeof(*res));
822 newstruct_desc parent_desc=(newstruct_desc)parent_bb->data;
823 res->size=parent_desc->size;
824 res->member=parent_desc->member;
825 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
§ newstructFromString()
newstruct_desc newstructFromString |
( |
const char * |
s | ) |
|
Definition at line 796 of file newstruct.cc.
798 newstruct_desc
res=(newstruct_desc)
omAlloc0(
sizeof(*res));
const CanonicalForm int s
static newstruct_desc scanNewstructFromString(const char *s, newstruct_desc res)
§ newstructShow()
void newstructShow |
( |
newstruct_desc |
d | ) |
|
Definition at line 830 of file newstruct.cc.
832 newstruct_member elem;
833 Print(
"id: %d\n",d->id);
837 Print(
">>%s<< at pos %d, type %d (%s)\n",elem->name,elem->pos,elem->typ,
Tok2Cmdname(elem->typ));
839 Print(
">>r_%s<< at pos %d, shadow ring\n",elem->name,elem->pos-1);
842 newstruct_proc
p=d->procs;
845 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)