Lines Matching +full:software +full:- +full:dl

4  * media and as a part of the software program in whole or part.  Users
53 * Emit the C-routine for the given definition
58 if (def->def_kind == DEF_CONST) { in emit()
61 if (def->def_kind == DEF_PROGRAM) { in emit()
65 if (def->def_kind == DEF_TYPEDEF) { in emit()
72 if (strcmp(def->def.ty.old_type, def->def_name) == 0) in emit()
76 switch (def->def_kind) { in emit()
100 if (def->def_kind == DEF_PROGRAM || def->def_kind == DEF_CONST) { in findtype()
103 return (streq(def->def_name, type)); in findtype()
133 print_generic_header(def->def_name, in print_header()
134 def->def_kind != DEF_TYPEDEF || in print_header()
135 !isvectordef(def->def.ty.old_type, in print_header()
136 def->def.ty.rel)); in print_header()
148 print_generic_header(plist->args.argname, 1); in print_prog_header()
259 "&%s->%s_val, (u_int *) &%s->%s_len", in print_ifstat()
288 decl_list *dl; in emit_program() local
292 for (vlist = def->def.pr.versions; vlist != NULL; vlist = vlist->next) in emit_program()
293 for (plist = vlist->procs; plist != NULL; plist = plist->next) { in emit_program()
294 if (!newstyle || plist->arg_num < 2) in emit_program()
297 for (dl = plist->args.decls; dl != NULL; in emit_program()
298 dl = dl->next) in emit_program()
299 print_stat(1, &dl->decl); in emit_program()
312 const char *vecformat = "objp->%s_u.%s"; in emit_union()
313 const char *format = "&objp->%s_u.%s"; in emit_union()
315 print_stat(1, &def->def.un.enum_decl); in emit_union()
316 f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name); in emit_union()
317 for (cl = def->def.un.cases; cl != NULL; cl = cl->next) { in emit_union()
319 f_print(fout, "\tcase %s:\n", cl->case_name); in emit_union()
320 if (cl->contflag == 1) /* a continued case statement */ in emit_union()
322 cs = &cl->case_decl; in emit_union()
323 if (!streq(cs->type, "void")) { in emit_union()
324 object = xmalloc(strlen(def->def_name) + in emit_union()
325 strlen(format) + strlen(cs->name) + 1); in emit_union()
326 if (isvectordef (cs->type, cs->rel)) { in emit_union()
327 s_print(object, vecformat, def->def_name, in emit_union()
328 cs->name); in emit_union()
330 s_print(object, format, def->def_name, in emit_union()
331 cs->name); in emit_union()
333 print_ifstat(2, cs->prefix, cs->type, cs->rel, in emit_union()
334 cs->array_max, object, cs->name); in emit_union()
339 dflt = def->def.un.default_decl; in emit_union()
341 if (!streq(dflt->type, "void")) { in emit_union()
343 object = xmalloc(strlen(def->def_name) + in emit_union()
344 strlen(format) + strlen(dflt->name) + 1); in emit_union()
345 if (isvectordef (dflt->type, dflt->rel)) { in emit_union()
346 s_print(object, vecformat, def->def_name, in emit_union()
347 dflt->name); in emit_union()
349 s_print(object, format, def->def_name, in emit_union()
350 dflt->name); in emit_union()
353 print_ifstat(2, dflt->prefix, dflt->type, dflt->rel, in emit_union()
354 dflt->array_max, object, dflt->name); in emit_union()
372 decl_list *dl; in inline_struct() local
383 f_print(fout, "\n\tif (xdrs->x_op == XDR_ENCODE) {\n"); in inline_struct()
385 f_print(fout, "\t\treturn (TRUE);\n\t} else if (xdrs->x_op == XDR_DECODE) {\n"); in inline_struct()
390 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) { /* xxx */ in inline_struct()
392 if ((dl->decl.prefix == NULL) && in inline_struct()
393 ((ptr = find_type(dl->decl.type)) != NULL) && in inline_struct()
394 ((dl->decl.rel == REL_ALIAS) || in inline_struct()
395 (dl->decl.rel == REL_VECTOR))){ in inline_struct()
397 cur = dl; in inline_struct()
400 if (dl->decl.rel == REL_ALIAS) in inline_struct()
401 size += ptr->length; in inline_struct()
409 if (ptr->length != 1) in inline_struct()
411 plus, dl->decl.array_max, in inline_struct()
412 ptr->length); in inline_struct()
415 dl->decl.array_max); in inline_struct()
436 while (cur != dl){ in inline_struct()
437 print_stat(indent + 1, &cur->decl); in inline_struct()
438 cur = cur->next; in inline_struct()
463 while (cur != dl){ in inline_struct()
464 print_stat(indent + 2, &cur->decl); in inline_struct()
465 cur = cur->next; in inline_struct()
471 while (cur != dl){ in inline_struct()
472 emit_inline(indent + 2, &cur->decl, flag); in inline_struct()
473 cur = cur->next; in inline_struct()
484 print_stat(indent + 1, &dl->decl); in inline_struct()
491 while (cur != dl){ in inline_struct()
492 print_stat(indent + 1, &cur->decl); in inline_struct()
493 cur = cur->next; in inline_struct()
513 print_stat(indent + 2, &cur->decl); in inline_struct()
514 cur = cur->next; in inline_struct()
519 while (cur != dl){ in inline_struct()
520 emit_inline(indent + 2, &cur->decl, flag); in inline_struct()
521 cur = cur->next; in inline_struct()
531 decl_list *dl; in emit_struct() local
538 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) in emit_struct()
539 print_stat(1, &dl->decl); in emit_struct()
543 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) in emit_struct()
544 if (dl->decl.rel == REL_VECTOR && in emit_struct()
545 strcmp(dl->decl.type, "opaque") != 0){ in emit_struct()
555 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) in emit_struct()
556 if ((dl->decl.prefix == NULL) && in emit_struct()
557 ((ptr = find_type(dl->decl.type)) != NULL) && in emit_struct()
558 ((dl->decl.rel == REL_ALIAS)|| in emit_struct()
559 (dl->decl.rel == REL_VECTOR))){ in emit_struct()
560 if (dl->decl.rel == REL_ALIAS) in emit_struct()
561 size += ptr->length; in emit_struct()
577 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) in emit_struct()
578 print_stat(1, &dl->decl); in emit_struct()
593 for (dl = def->def.st.decls; dl != NULL; dl = dl->next) in emit_struct()
594 print_stat(1, &dl->decl); in emit_struct()
601 const char *prefix = def->def.ty.old_prefix; in emit_typedef()
602 const char *type = def->def.ty.old_type; in emit_typedef()
603 const char *amax = def->def.ty.array_max; in emit_typedef()
604 relation rel = def->def.ty.rel; in emit_typedef()
606 print_ifstat(1, prefix, type, rel, amax, "objp", def->def_name); in emit_typedef()
612 const char *prefix = dec->prefix; in print_stat()
613 const char *type = dec->type; in print_stat()
614 const char *amax = dec->array_max; in print_stat()
615 relation rel = dec->rel; in print_stat()
619 s_print(name, "objp->%s", dec->name); in print_stat()
621 s_print(name, "&objp->%s", dec->name); in print_stat()
623 print_ifstat(indent, prefix, type, rel, amax, name, dec->name); in print_stat()
632 switch (decl->rel) { in emit_inline()
640 f_print(fout, "%s *genp;\n\n", decl->type); in emit_inline()
643 "for (i = 0, genp = objp->%s;\n", decl->name); in emit_inline()
645 f_print(fout, "i < %s; i++) {\n", decl->array_max); in emit_inline()
667 f_print(fout, "objp->%s = IXDR_GET_", decl->name); in emit_single_in_line()
671 upp_case = upcase(decl->type); in emit_single_in_line()
673 /* hack - XX */ in emit_single_in_line()
688 "%s(buf, objp->%s);\n", upp_case, decl->name); in emit_single_in_line()