Module Name:    src
Committed By:   ginsbach
Date:           Wed May  6 14:30:51 UTC 2009

Modified Files:
        src/usr.bin/rpcgen: rpc_parse.c rpc_scan.c rpc_scan.h

Log Message:
Add support for hyper and quad keywords.  (See Sun ONC+ Developer's Guide
and RFC-4506 for additional details.)  [From FreeBSD and OpenSolaris]


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/rpcgen/rpc_parse.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/rpcgen/rpc_scan.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/rpcgen/rpc_scan.h

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_parse.c
diff -u src/usr.bin/rpcgen/rpc_parse.c:1.15 src/usr.bin/rpcgen/rpc_parse.c:1.16
--- src/usr.bin/rpcgen/rpc_parse.c:1.15	Tue Apr  4 21:27:42 2006
+++ src/usr.bin/rpcgen/rpc_parse.c	Wed May  6 14:30:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_parse.c,v 1.15 2006/04/04 21:27:42 christos Exp $	*/
+/*	$NetBSD: rpc_parse.c,v 1.16 2009/05/06 14:30:51 ginsbach 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.15 2006/04/04 21:27:42 christos Exp $");
+__RCSID("$NetBSD: rpc_parse.c,v 1.16 2009/05/06 14:30:51 ginsbach Exp $");
 #endif
 #endif
 
@@ -578,6 +578,10 @@
 		*typep = "long";
 		(void) peekscan(TOK_INT, &tok);
 		break;
+	case TOK_HYPER:
+		*typep = "longlong_t";
+		(void) peekscan(TOK_INT, &tok);
+		break;
 	case TOK_VOID:
 		if (dkind != DEF_UNION && dkind != DEF_PROGRAM) {
 			error("voids allowed only inside union and program definitions with one argument");
@@ -591,6 +595,7 @@
 	case TOK_FLOAT:
 	case TOK_DOUBLE:
 	case TOK_BOOL:
+	case TOK_QUAD:
 		*typep = tok.str;
 		break;
 	default:
@@ -620,6 +625,11 @@
 		*typep = "u_long";
 		(void) peekscan(TOK_INT, &tok);
 		break;
+	case TOK_HYPER:
+		get_token(&tok);
+		*typep = "u_longlong_t";
+		(void) peekscan(TOK_INT, &tok);
+		break;
 	case TOK_INT:
 		get_token(&tok);
 		*typep = "u_int";

Index: src/usr.bin/rpcgen/rpc_scan.c
diff -u src/usr.bin/rpcgen/rpc_scan.c:1.10 src/usr.bin/rpcgen/rpc_scan.c:1.11
--- src/usr.bin/rpcgen/rpc_scan.c:1.10	Mon Mar 20 17:01:26 2006
+++ src/usr.bin/rpcgen/rpc_scan.c	Wed May  6 14:30:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_scan.c,v 1.10 2006/03/20 17:01:26 elad Exp $	*/
+/*	$NetBSD: rpc_scan.c,v 1.11 2009/05/06 14:30:51 ginsbach 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_scan.c 1.11 89/02/22 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_scan.c,v 1.10 2006/03/20 17:01:26 elad Exp $");
+__RCSID("$NetBSD: rpc_scan.c,v 1.11 2009/05/06 14:30:51 ginsbach Exp $");
 #endif
 #endif
 
@@ -414,8 +414,10 @@
 	{TOK_UNSIGNED, "unsigned"},
 	{TOK_SHORT, "short"},
 	{TOK_LONG, "long"},
+	{TOK_HYPER, "hyper"},
 	{TOK_FLOAT, "float"},
 	{TOK_DOUBLE, "double"},
+	{TOK_QUAD, "quadruple"},
 	{TOK_STRING, "string"},
 	{TOK_PROGRAM, "program"},
 	{TOK_VERSION, "version"},

Index: src/usr.bin/rpcgen/rpc_scan.h
diff -u src/usr.bin/rpcgen/rpc_scan.h:1.7 src/usr.bin/rpcgen/rpc_scan.h:1.8
--- src/usr.bin/rpcgen/rpc_scan.h:1.7	Mon Oct 27 00:12:43 2003
+++ src/usr.bin/rpcgen/rpc_scan.h	Wed May  6 14:30:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_scan.h,v 1.7 2003/10/27 00:12:43 lukem Exp $	*/
+/*	$NetBSD: rpc_scan.h,v 1.8 2009/05/06 14:30:51 ginsbach 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
@@ -70,9 +70,11 @@
 	TOK_INT,
 	TOK_SHORT,
 	TOK_LONG,
+	TOK_HYPER,
 	TOK_UNSIGNED,
 	TOK_FLOAT,
 	TOK_DOUBLE,
+	TOK_QUAD,
 	TOK_OPAQUE,
 	TOK_CHAR,
 	TOK_STRING,

Reply via email to