rpc_hout.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2001 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* rpc_hout.c, Header file outputter for the RPC protocol compiler
*/
#include <stdio.h>
#include <ctype.h>
#include "rpc_parse.h"
#include "rpc_util.h"
void storexdrfuncdecl();
static char RESULT[] = "clnt_res";
static enum rpc_gvc {
};
/*
* Print the C-version of an xdr definition
*/
void
{
return;
}
case DEF_STRUCT:
break;
case DEF_UNION:
break;
case DEF_ENUM:
break;
case DEF_TYPEDEF:
break;
case DEF_PROGRAM:
break;
case DEF_CONST:
break;
}
}
}
void
{
case DEF_PROGRAM:
break;
}
}
/*
* store away enough information to allow the XDR functions to be spat
* out at the end of the file
*/
void
{
if (xdrfunc_tail == NULL) {
} else {
}
}
void
{
if (i == 2)
else
}
static
{
}
/*
* print out the definitions for the arguments of functions in the
* header file
*/
static
{
decl_list *l;
char *name;
continue; /* old style or single args */
}
}
}
}
}
static
{
decl_list *l;
}
}
static
{
case_list *l;
} else {
}
if (l->contflag == 0)
}
}
}
static
char *name;
char *num;
{
}
static
{
switch (which) {
case PROGRAM:
case VERSION:
case PROCEDURE:
break;
default:
break;
}
}
static
{
return (0);
return (1);
}
}
}
abort();
/* NOTREACHED */
}
static
{
if (mode == 1)
else
}
static
{
int i;
char *ext;
if (tblflag) {
"extern struct rpcgen_table %s_%s_table[];\n",
"extern %s_%s_nproc;\n",
}
/*
* Print out 2 definitions, one for ANSI-C, another for
* old K & R C
*/
if (!Cflag) {
ext = "extern ";
if (!define_printed(proc,
}
if (mtflag) {
}
}
} else {
for (i = 1; i < 3; i++) {
if (i == 1) {
" || defined(__cplusplus)\n");
ext = "extern ";
} else {
ext = "extern ";
}
if (!define_printed(proc,
}
"struct svc_req *", 1, i);
}
}
}
}
}
char *addargtype;
int server_p;
int mode;
{
if (mtflag) {
/* Print MT style stubs */
if (server_p)
else
} else {
}
if (server_p)
else
/*
* mode 1 = ANSI-C, mode 2 = K&R C
*/
if (mode == 1)
else
}
/* print out argument list of procedure */
static
char *addargtype;
int server_p;
{
/* 0 argument in new style: do nothing */
} else {
/* old style passes by reference */
}
}
}
}
static
{
enumval_list *l;
int count = 0;
if (l->assignment) {
last = l->assignment;
count = 1;
} else {
} else {
}
}
if (l->next)
else
}
}
static
{
old = "char";
rel = REL_POINTER;
old = "char";
old = "bool_t";
}
} else {
prefix[0] = 0;
}
switch (rel) {
case REL_ARRAY:
break;
case REL_POINTER:
break;
case REL_VECTOR:
break;
case REL_ALIAS:
break;
}
}
}
char *name;
int tab;
char *separator;
{
char *prefix;
char *type;
return;
}
}
} else {
prefix = "";
type = "bool_t";
type = "char";
} else {
}
}
case REL_ALIAS:
break;
case REL_VECTOR:
break;
case REL_POINTER:
break;
case REL_ARRAY:
break;
}
}
}
static
char *type;
char *stop;
{
list *l;
return (1);
return (0);
}
}
}
return (1);
}