Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rpcgen u_int -> unsigned int, in some of the output.



details:   https://anonhg.NetBSD.org/src/rev/824b27e2b0ec
branches:  trunk
changeset: 343126:824b27e2b0ec
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Jan 23 02:33:09 2016 +0000

description:
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.

diffstat:

 usr.bin/rpcgen/rpc_cout.c   |  12 ++++++------
 usr.bin/rpcgen/rpc_hout.c   |   8 ++++----
 usr.bin/rpcgen/rpc_parse.c  |  10 +++++-----
 usr.bin/rpcgen/rpc_tblout.c |   8 ++++----
 4 files changed, 19 insertions(+), 19 deletions(-)

diffs (160 lines):

diff -r 6ab969d940be -r 824b27e2b0ec usr.bin/rpcgen/rpc_cout.c
--- a/usr.bin/rpcgen/rpc_cout.c Sat Jan 23 01:57:56 2016 +0000
+++ b/usr.bin/rpcgen/rpc_cout.c Sat Jan 23 02:33:09 2016 +0000
@@ -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 @@
 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_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);
                        }
                }
diff -r 6ab969d940be -r 824b27e2b0ec usr.bin/rpcgen/rpc_hout.c
--- a/usr.bin/rpcgen/rpc_hout.c Sat Jan 23 01:57:56 2016 +0000
+++ b/usr.bin/rpcgen/rpc_hout.c Sat Jan 23 02:33:09 2016 +0000
@@ -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 @@
                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 @@
                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);
diff -r 6ab969d940be -r 824b27e2b0ec usr.bin/rpcgen/rpc_parse.c
--- a/usr.bin/rpcgen/rpc_parse.c        Sat Jan 23 01:57:56 2016 +0000
+++ b/usr.bin/rpcgen/rpc_parse.c        Sat Jan 23 02:33:09 2016 +0000
@@ -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 @@
                        }
                        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 @@
                }
                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 @@
                                                 * 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 */
                }
        }
diff -r 6ab969d940be -r 824b27e2b0ec usr.bin/rpcgen/rpc_tblout.c
--- a/usr.bin/rpcgen/rpc_tblout.c       Sat Jan 23 01:57:56 2016 +0000
+++ b/usr.bin/rpcgen/rpc_tblout.c       Sat Jan 23 02:33:09 2016 +0000
@@ -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 @@
  \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 @@
        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, ")");



Home | Main Index | Thread Index | Old Index