Lines Matching refs:t

46 #define	Ref(t)		((t)->ref)  argument
47 #define TypeL(t) ((t)->left) argument
48 #define TypeR(t) ((t)->right) argument
49 #define MakeA(t) ((t)->makearg) argument
50 #define CopyA(t) ((t)->copyarg) argument
51 #define FreeA(t) ((t)->freearg) argument
52 #define Fcheck(t) ((t)->fcheck) argument
53 #define Ccheck(t) ((t)->ccheck) argument
54 #define Next(t) ((t)->next) argument
55 #define Prev(t) ((t)->prev) argument
82 FIELDTYPE *t = (FIELDTYPE *) 0; in new_fieldtype() local
84 if ((fcheck || ccheck) && Alloc(t, FIELDTYPE)) { in new_fieldtype()
85 *t = *_DEFAULT_FIELDTYPE; in new_fieldtype()
87 Fcheck(t) = fcheck; in new_fieldtype()
88 Ccheck(t) = ccheck; in new_fieldtype()
90 return (t); in new_fieldtype()
96 FIELDTYPE *t = (FIELDTYPE *) 0; in link_fieldtype() local
98 if ((left || right) && Alloc(t, FIELDTYPE)) { in link_fieldtype()
99 *t = *_DEFAULT_FIELDTYPE; in link_fieldtype()
101 Set(t, LINKED); in link_fieldtype()
104 Set(t, ARGS); in link_fieldtype()
107 Set(t, CHOICE); in link_fieldtype()
109 TypeL(t) = left; in link_fieldtype()
110 TypeR(t) = right; in link_fieldtype()
114 return (t); in link_fieldtype()
118 free_fieldtype(FIELDTYPE *t) in free_fieldtype() argument
120 if (!t) in free_fieldtype()
123 if (Ref(t)) in free_fieldtype()
126 if (Status(t, LINKED)) { in free_fieldtype()
127 DecrType(TypeL(t)); /* decrement reference count */ in free_fieldtype()
128 DecrType(TypeR(t)); /* decrement reference count */ in free_fieldtype()
130 Free(t); in free_fieldtype()
135 set_fieldtype_arg(FIELDTYPE *t, PTF_charP makearg, in set_fieldtype_arg() argument
138 if (t && makearg && copyarg && freearg) { in set_fieldtype_arg()
139 Set(t, ARGS); in set_fieldtype_arg()
140 MakeA(t) = makearg; in set_fieldtype_arg()
141 CopyA(t) = copyarg; in set_fieldtype_arg()
142 FreeA(t) = freearg; in set_fieldtype_arg()
150 set_fieldtype_choice(FIELDTYPE *t, PTF_int next, PTF_int prev) in set_fieldtype_choice() argument
152 if (t && next && prev) { in set_fieldtype_choice()
153 Set(t, CHOICE); in set_fieldtype_choice()
154 Next(t) = next; in set_fieldtype_choice()
155 Prev(t) = prev; in set_fieldtype_choice()
162 _makearg(FIELDTYPE *t, va_list *ap, int *err) in _makearg() argument
171 if (! t || ! Status(t, ARGS)) in _makearg()
174 if (Status(t, LINKED)) { in _makearg()
178 ArgL(n) = _makearg(TypeL(t), ap, err); in _makearg()
179 ArgR(n) = _makearg(TypeR(t), ap, err); in _makearg()
184 if (!(p = (*MakeA(t)) (ap))) in _makearg()
190 _copyarg(FIELDTYPE *t, char *arg, int *err) in _copyarg() argument
199 if (!t || !Status(t, ARGS)) in _copyarg()
202 if (Status(t, LINKED)) { in _copyarg()
206 ArgL(n) = _copyarg(TypeL(t), ArgL(arg), err); in _copyarg()
207 ArgR(n) = _copyarg(TypeR(t), ArgR(arg), err); in _copyarg()
212 if (!(p = (*CopyA(t)) (arg))) in _copyarg()
219 _freearg(FIELDTYPE *t, char *arg) in _freearg() argument
221 if (!t || !Status(t, ARGS)) in _freearg()
224 if (Status(t, LINKED)) { in _freearg()
225 _freearg(TypeL(t), ArgL(arg)); in _freearg()
226 _freearg(TypeR(t), ArgR(arg)); in _freearg()
229 (*FreeA(t)) (arg); in _freearg()
234 _checkfield(FIELDTYPE *t, FIELD *f, char *arg) in _checkfield() argument
236 if (!t) in _checkfield()
247 if (Status(t, LINKED)) in _checkfield()
248 return (_checkfield(TypeL(t), f, ArgL(arg)) || in _checkfield()
249 _checkfield(TypeR(t), f, ArgR(arg))); in _checkfield()
251 if (Fcheck(t)) in _checkfield()
252 return ((*Fcheck(t)) (f, arg)); in _checkfield()
258 _checkchar(FIELDTYPE *t, int c, char *arg) in _checkchar() argument
260 if (!t) in _checkchar()
263 if (Status(t, LINKED)) in _checkchar()
264 return (_checkchar(TypeL(t), c, ArgL(arg)) || in _checkchar()
265 _checkchar(TypeR(t), c, ArgR(arg))); in _checkchar()
267 if (Ccheck(t)) in _checkchar()
268 return ((*Ccheck(t)) (c, arg)); in _checkchar()
274 _nextchoice(FIELDTYPE *t, FIELD *f, char *arg) in _nextchoice() argument
276 if (!t || !Status(t, CHOICE)) in _nextchoice()
279 if (Status(t, LINKED)) in _nextchoice()
280 return (_nextchoice(TypeL(t), f, ArgL(arg)) || in _nextchoice()
281 _nextchoice(TypeR(t), f, ArgR(arg))); in _nextchoice()
283 return ((*Next(t)) (f, arg)); in _nextchoice()
288 _prevchoice(FIELDTYPE *t, FIELD *f, char *arg) in _prevchoice() argument
290 if (!t || !Status(t, CHOICE)) in _prevchoice()
293 if (Status(t, LINKED)) in _prevchoice()
294 return (_prevchoice(TypeL(t), f, ArgL(arg)) || in _prevchoice()
295 _prevchoice(TypeR(t), f, ArgR(arg))); in _prevchoice()
297 return ((*Prev(t)) (f, arg)); in _prevchoice()