Esempio n. 1
0
/*
 * Print the C-version of an xdr definition
 */
void
print_datadef(definition *def)
{

	if (def->def_kind == DEF_PROGRAM)	/* handle data only */
		return;

	if (def->def_kind != DEF_CONST) {
		f_print(fout, "\n");
	}
	switch (def->def_kind) {
	case DEF_STRUCT:
		pstructdef(def);
		break;
	case DEF_UNION:
		puniondef(def);
		break;
	case DEF_ENUM:
		penumdef(def);
		break;
	case DEF_TYPEDEF:
		ptypedef(def);
		break;
	case DEF_PROGRAM:
		pprogramdef(def);
		break;
	case DEF_CONST:
		pconstdef(def);
		break;
	}
}
Esempio n. 2
0
/*
 * Print the C-version of an xdr definition
 */
void
print_datadef(definition *def)
{
	if (def->def_kind == DEF_PROGRAM)  /* handle data only */
		return;

	if (def->def_kind != DEF_CONST)
		f_print(fout, "\n");
	switch (def->def_kind) {
	case DEF_STRUCT:
		pstructdef(def);
		break;
	case DEF_UNION:
		puniondef(def);
		break;
	case DEF_ENUM:
		penumdef(def);
		break;
	case DEF_TYPEDEF:
		ptypedef(def);
		break;
	case DEF_PROGRAM:
		pprogramdef(def);
		break;
	case DEF_CONST:
		pconstdef(def);
		break;
	}
	if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST)
		storexdrfuncdecl(def->def_name, def->def_kind != DEF_TYPEDEF ||
		    !isvectordef(def->def.ty.old_type, def->def.ty.rel));
}
Esempio n. 3
0
/*
 * Print the C-version of an xdr definition
 */
void
print_datadef(definition * def)
{
    if (Sflag)
	scan_print = 0;
    if ((def->def_kind != DEF_CONST) && (!IsRxgenDefinition(def))) {
	f_print(fout, "\n");
    }
    switch (def->def_kind) {
    case DEF_CUSTOMIZED:
    case DEF_STRUCT:
	pstructdef(def);
	break;
    case DEF_UNION:
	puniondef(def);
	break;
    case DEF_ENUM:
	penumdef(def);
	break;
    case DEF_TYPEDEF:
	ptypedef(def);
	break;
    case DEF_PROGRAM:
	pprogramdef(def);
	break;
    case DEF_PROC:
	psprocdef(def);
	break;
    case DEF_CONST:
	pconstdef(def);
	break;
    default:
	break;
    }
    if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST
	&& (!IsRxgenDefinition(def))) {
	f_print(fout, "bool_t xdr_%s(XDR *xdrs, %s *objp);\n", def->def_name,
		def->def_name);
    }
    if (def->def_kind != DEF_CONST && (!IsRxgenDefinition(def))) {
	f_print(fout, "\n");
    }
    if (Sflag)
	scan_print = 1;
}