summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2005-02-10 10:44:29 +0000
committeralfred <alfred@FreeBSD.org>2005-02-10 10:44:29 +0000
commite6388323e99e0b7621ce3724ac9d9fd6509b455c (patch)
tree8831cb8d83a84c5e38413c5b00e09cb9aa291a40
parent5ecf8a7b0e9bcee91c553e2b54967c0eafe35b23 (diff)
downloadFreeBSD-src-e6388323e99e0b7621ce3724ac9d9fd6509b455c.zip
FreeBSD-src-e6388323e99e0b7621ce3724ac9d9fd6509b455c.tar.gz
back out 1.7 changes, unneeded and possibly wrong.
-rw-r--r--usr.bin/rpcgen/rpc_tblout.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.bin/rpcgen/rpc_tblout.c b/usr.bin/rpcgen/rpc_tblout.c
index b0896ef..e23e058 100644
--- a/usr.bin/rpcgen/rpc_tblout.c
+++ b/usr.bin/rpcgen/rpc_tblout.c
@@ -55,13 +55,11 @@ __FBSDID("$FreeBSD$");
static char tabstr[TABCOUNT+1] = "\t\t\t\t\t";
static char tbl_hdr[] = "struct rpcgen_table %s_table[] = {\n";
-static char tbl_end[] = "\n};\n";
+static char tbl_end[] = "};\n";
-static char null_entry[] = "\n\t{\n\
- \tNULL,\n\
+static char null_entry[] = "\n\t(char *(*)())0,\n\
\t(xdrproc_t) xdr_void,\t\t\t0,\n\
- \t(xdrproc_t) xdr_void,\t\t\t0,\n\
- \t}";
+ \t(xdrproc_t) xdr_void,\t\t\t0,\n";
static char tbl_nproc[] = "int %s_nproc =\n\tsizeof(%s_table)/sizeof(%s_table[0]);\n\n";
@@ -121,7 +119,7 @@ write_table(def)
}
expected = current + 1;
}
- f_print(fout, ",\n\n\t{\n\tRPCGEN_ACTION(");
+ f_print(fout, "\n\t(char *(*)())RPCGEN_ACTION(");
/* routine to invoke */
if( Cflag && !newstyle )
@@ -142,7 +140,6 @@ write_table(def)
proc->args.decls->decl.type );
/* result info */
printit(proc->res_prefix, proc->res_type);
- f_print(fout, "\t}");
}
/* print the table trailer */
@@ -160,7 +157,7 @@ printit(prefix, type)
int tabs;
- len = fprintf(fout, "\t(xdrproc_t) xdr_%s,", stringfix(type));
+ len = fprintf(fout, "\txdr_%s,", stringfix(type));
/* account for leading tab expansion */
len += TABSIZE - 1;
/* round up to tabs required */
@@ -170,7 +167,7 @@ printit(prefix, type)
if (streq(type, "void")) {
f_print(fout, "0");
} else {
- f_print(fout, " sizeof ( ");
+ f_print(fout, "sizeof ( ");
/* XXX: should "follow" be 1 ??? */
ptype(prefix, type, 0);
f_print(fout, ")");
OpenPOWER on IntegriCloud