Module Name: src
Committed By: dholland
Date: Sat Jan 23 02:33:09 UTC 2016
Modified Files:
src/usr.bin/rpcgen: rpc_cout.c rpc_hout.c rpc_parse.c rpc_tblout.c
Log Message:
u_int -> unsigned int, in some of the output.
In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/rpcgen/rpc_cout.c
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/rpcgen/rpc_hout.c
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/rpcgen/rpc_parse.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/rpcgen/rpc_tblout.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/rpcgen/rpc_cout.c
diff -u src/usr.bin/rpcgen/rpc_cout.c:1.37 src/usr.bin/rpcgen/rpc_cout.c:1.38
--- src/usr.bin/rpcgen/rpc_cout.c:1.37 Sun Sep 20 16:57:13 2015
+++ src/usr.bin/rpcgen/rpc_cout.c Sat Jan 23 02:33:09 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_cout.c,v 1.37 2015/09/20 16:57:13 kamil Exp $ */
+/* $NetBSD: rpc_cout.c,v 1.38 2016/01/23 02:33:09 dholland Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
#else
-__RCSID("$NetBSD: rpc_cout.c,v 1.37 2015/09/20 16:57:13 kamil Exp $");
+__RCSID("$NetBSD: rpc_cout.c,v 1.38 2016/01/23 02:33:09 dholland Exp $");
#endif
#endif
@@ -203,9 +203,9 @@ static void
print_ifsizeof(const char *prefix, const char *type)
{
if (streq(type, "bool")) {
- f_print(fout, ", (u_int)sizeof(bool_t), (xdrproc_t)xdr_bool");
+ f_print(fout, ", (unsigned int)sizeof(bool_t), (xdrproc_t)xdr_bool");
} else {
- f_print(fout, ", (u_int)sizeof(");
+ f_print(fout, ", (unsigned int)sizeof(");
if (undefined(type) && prefix) {
f_print(fout, "%s ", prefix);
}
@@ -272,10 +272,10 @@ print_ifstat(int indent, const char *pre
}
print_ifarg("(char **)(void *)");
if (*objname == '&') {
- f_print(fout, "%s.%s_val, (u_int *)%s.%s_len",
+ f_print(fout, "%s.%s_val, (unsigned int *)%s.%s_len",
objname, name, objname, name);
} else {
- f_print(fout, "&%s->%s_val, (u_int *)&%s->%s_len",
+ f_print(fout, "&%s->%s_val, (unsigned int *)&%s->%s_len",
objname, name, objname, name);
}
}
Index: src/usr.bin/rpcgen/rpc_hout.c
diff -u src/usr.bin/rpcgen/rpc_hout.c:1.24 src/usr.bin/rpcgen/rpc_hout.c:1.25
--- src/usr.bin/rpcgen/rpc_hout.c:1.24 Sun Sep 20 15:45:07 2015
+++ src/usr.bin/rpcgen/rpc_hout.c Sat Jan 23 02:33:09 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_hout.c,v 1.24 2015/09/20 15:45:07 kamil Exp $ */
+/* $NetBSD: rpc_hout.c,v 1.25 2016/01/23 02:33:09 dholland Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
#else
-__RCSID("$NetBSD: rpc_hout.c,v 1.24 2015/09/20 15:45:07 kamil Exp $");
+__RCSID("$NetBSD: rpc_hout.c,v 1.25 2016/01/23 02:33:09 dholland Exp $");
#endif
#endif
@@ -447,7 +447,7 @@ ptypedef(definition *def)
switch (rel) {
case REL_ARRAY:
f_print(fout, "struct {\n");
- f_print(fout, "\tu_int %s_len;\n", name);
+ f_print(fout, "\tunsigned int %s_len;\n", name);
f_print(fout, "\t%s%s *%s_val;\n", prefix, old, name);
f_print(fout, "} %s", name);
break;
@@ -511,7 +511,7 @@ pdeclaration(const char *name, declarati
case REL_ARRAY:
f_print(fout, "struct {\n");
tabify(fout, tab);
- f_print(fout, "\tu_int %s_len;\n", dec->name);
+ f_print(fout, "\tunsigned int %s_len;\n", dec->name);
tabify(fout, tab);
f_print(fout, "\t%s%s *%s_val;\n", prefix, type, dec->name);
tabify(fout, tab);
Index: src/usr.bin/rpcgen/rpc_parse.c
diff -u src/usr.bin/rpcgen/rpc_parse.c:1.21 src/usr.bin/rpcgen/rpc_parse.c:1.22
--- src/usr.bin/rpcgen/rpc_parse.c:1.21 Sat May 9 23:29:51 2015
+++ src/usr.bin/rpcgen/rpc_parse.c Sat Jan 23 02:33:09 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_parse.c,v 1.21 2015/05/09 23:29:51 dholland Exp $ */
+/* $NetBSD: rpc_parse.c,v 1.22 2016/01/23 02:33:09 dholland Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI";
#else
-__RCSID("$NetBSD: rpc_parse.c,v 1.21 2015/05/09 23:29:51 dholland Exp $");
+__RCSID("$NetBSD: rpc_parse.c,v 1.22 2016/01/23 02:33:09 dholland Exp $");
#endif
#endif
@@ -440,7 +440,7 @@ get_declaration(declaration *dec, defkin
}
dec->rel = REL_ARRAY;
if (peekscan(TOK_RANGLE, &tok)) {
- dec->array_max = "(u_int)~0";
+ dec->array_max = "(unsigned int)~0";
/* unspecified size, use * max */
} else {
scan_num(&tok);
@@ -506,7 +506,7 @@ get_prog_declaration(declaration *dec, d
}
dec->rel = REL_ARRAY;
if (peekscan(TOK_RANGLE, &tok)) {
- dec->array_max = "(u_int)~0";
+ dec->array_max = "(unsigned int)~0";
/* unspecified size, use max */
} else {
scan_num(&tok);
@@ -519,7 +519,7 @@ get_prog_declaration(declaration *dec, d
* type of argument - make it
* string<> */
dec->rel = REL_ARRAY;
- dec->array_max = "(u_int)~0";
+ dec->array_max = "(unsigned int)~0";
/* unspecified size, use max */
}
}
Index: src/usr.bin/rpcgen/rpc_tblout.c
diff -u src/usr.bin/rpcgen/rpc_tblout.c:1.14 src/usr.bin/rpcgen/rpc_tblout.c:1.15
--- src/usr.bin/rpcgen/rpc_tblout.c:1.14 Sun Dec 15 00:40:17 2013
+++ src/usr.bin/rpcgen/rpc_tblout.c Sat Jan 23 02:33:09 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_tblout.c,v 1.14 2013/12/15 00:40:17 christos Exp $ */
+/* $NetBSD: rpc_tblout.c,v 1.15 2016/01/23 02:33:09 dholland Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI";
#else
-__RCSID("$NetBSD: rpc_tblout.c,v 1.14 2013/12/15 00:40:17 christos Exp $");
+__RCSID("$NetBSD: rpc_tblout.c,v 1.15 2016/01/23 02:33:09 dholland Exp $");
#endif
#endif
@@ -66,7 +66,7 @@ static const char null_entry[] = "\t(cha
\t(xdrproc_t)xdr_void,\t\t0,\n";
static const char tbl_nproc[] =
- "u_int %s_nproc =\n\t(u_int)(sizeof(%s_table)/sizeof(%s_table[0]));\n\n";
+ "unsigned int %s_nproc =\n\t(unsigned int)(sizeof(%s_table)/sizeof(%s_table[0]));\n\n";
static void write_table(definition *);
static void printit(const char *, const char *);
@@ -172,7 +172,7 @@ printit(const char *prefix, const char *
if (streq(type, "void")) {
f_print(fout, "0");
} else {
- f_print(fout, "(u_int)sizeof(");
+ f_print(fout, "(unsigned int)sizeof(");
/* XXX: should "follow" be 1 ??? */
ptype(prefix, type, 0);
f_print(fout, ")");