Go to the source code of this file.
◆ newstruct_desc_size()
int newstruct_desc_size |
( |
| ) |
|
◆ newstruct_set_proc()
Definition at line 846 of file newstruct.cc.
852 Werror(
">>%s<< is not a newstruct type",bbname);
856 newstruct_desc desc=(newstruct_desc)bb->data;
857 newstruct_proc
p=(newstruct_proc)
omAlloc(
sizeof(*
p));
858 p->next=desc->procs; desc->procs=
p;
864 if(!(tt=
IsCmd(func,
p->t)))
884 Werror(
">>%s<< is not a kernel command",func);
900 if(args!=1) {
Warn(
"args must be 1 for %s in %s",func,
my_yylinebuf);args=1;}
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
VAR char my_yylinebuf[80]
int IsCmd(const char *n, int &tok)
int iiOpsTwoChar(const char *s)
#define omFreeSize(addr, size)
void Werror(const char *fmt,...)
◆ newstruct_setup()
void newstruct_setup |
( |
const char * |
name, |
|
|
newstruct_desc |
d |
|
) |
| |
Definition at line 688 of file newstruct.cc.
690 blackbox *
b=(blackbox*)
omAlloc0(
sizeof(blackbox));
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
BOOLEAN newstruct_Op2(int op, leftv res, leftv a1, leftv a2)
BOOLEAN newstruct_deserialize(blackbox **, void **d, si_link f)
void newstruct_destroy(blackbox *, void *d)
char * newstruct_String(blackbox *b, void *d)
BOOLEAN newstruct_Op1(int op, leftv res, leftv arg)
BOOLEAN newstruct_Assign(leftv l, leftv r)
BOOLEAN newstruct_serialize(blackbox *b, void *d, si_link f)
void * newstruct_Copy(blackbox *, void *d)
void * newstruct_Init(blackbox *b)
BOOLEAN newstruct_OpM(int op, leftv res, leftv args)
BOOLEAN newstruct_CheckAssign(blackbox *, leftv L, leftv R)
void newstruct_Print(blackbox *b, void *d)
◆ newstructChildFromString()
newstruct_desc newstructChildFromString |
( |
const char * |
p, |
|
|
const char * |
s |
|
) |
| |
Definition at line 799 of file newstruct.cc.
806 Werror(
">>%s< not found",parent);
813 Werror(
">>%s< is not a user defined type",parent);
818 newstruct_desc parent_desc=(newstruct_desc)parent_bb->data;
819 res->size=parent_desc->size;
820 res->member=parent_desc->member;
821 res->parent=parent_desc;
const CanonicalForm int s
static newstruct_desc scanNewstructFromString(const char *s, newstruct_desc res)
◆ newstructFromString()
newstruct_desc newstructFromString |
( |
const char * |
s | ) |
|
◆ newstructShow()
void newstructShow |
( |
newstruct_desc |
d | ) |
|
Definition at line 826 of file newstruct.cc.
828 newstruct_member elem;
829 Print(
"id: %d\n",d->id);
833 Print(
">>%s<< at pos %d, type %d (%s)\n",elem->name,elem->pos,elem->typ,
Tok2Cmdname(elem->typ));
835 Print(
">>r_%s<< at pos %d, shadow ring\n",elem->name,elem->pos-1);
838 newstruct_proc
p=d->procs;
841 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)
static int NeedShadowRing(int t)