summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2005-08-31 20:45:15 +0000
committerstefanf <stefanf@FreeBSD.org>2005-08-31 20:45:15 +0000
commited8baf6598227f7f0bfd138911ee5638efc2154b (patch)
tree4a33cf6a790409ae0d5b7959e4a8b9e8d6a81c3c /usr.bin/rpcgen
parent06122c40eb6ecf6cf398d8e9492d0f7aa6e9cf21 (diff)
downloadFreeBSD-src-ed8baf6598227f7f0bfd138911ee5638efc2154b.zip
FreeBSD-src-ed8baf6598227f7f0bfd138911ee5638efc2154b.tar.gz
- Use prototypes in headers.
- Include rpc_scan.h before rpc_util.h for the tok_kind enum. - Nuke unused declarations.
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r--usr.bin/rpcgen/rpc_clntout.c1
-rw-r--r--usr.bin/rpcgen/rpc_cout.c1
-rw-r--r--usr.bin/rpcgen/rpc_hout.c1
-rw-r--r--usr.bin/rpcgen/rpc_main.c2
-rw-r--r--usr.bin/rpcgen/rpc_parse.h2
-rw-r--r--usr.bin/rpcgen/rpc_sample.c1
-rw-r--r--usr.bin/rpcgen/rpc_scan.h14
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c1
-rw-r--r--usr.bin/rpcgen/rpc_tblout.c1
-rw-r--r--usr.bin/rpcgen/rpc_util.h68
10 files changed, 49 insertions, 43 deletions
diff --git a/usr.bin/rpcgen/rpc_clntout.c b/usr.bin/rpcgen/rpc_clntout.c
index 1e32876..e12eee4 100644
--- a/usr.bin/rpcgen/rpc_clntout.c
+++ b/usr.bin/rpcgen/rpc_clntout.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <rpc/types.h>
#include "rpc_parse.h"
+#include "rpc_scan.h"
#include "rpc_util.h"
extern void pdeclaration( char *, declaration *, int, char * );
diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c
index f8a18d4..39f7024 100644
--- a/usr.bin/rpcgen/rpc_cout.c
+++ b/usr.bin/rpcgen/rpc_cout.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
#include "rpc_parse.h"
+#include "rpc_scan.h"
#include "rpc_util.h"
static void print_header( definition * );
diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c
index fb25e52..c4f089e 100644
--- a/usr.bin/rpcgen/rpc_hout.c
+++ b/usr.bin/rpcgen/rpc_hout.c
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <ctype.h>
#include "rpc_parse.h"
+#include "rpc_scan.h"
#include "rpc_util.h"
void storexdrfuncdecl( char *, int );
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index 5e59848..f2b30e8 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$");
#include <sys/file.h>
#include <sys/stat.h>
#include "rpc_parse.h"
-#include "rpc_util.h"
#include "rpc_scan.h"
+#include "rpc_util.h"
extern void write_sample_svc( definition * );
extern int write_sample_clnt( definition * );
diff --git a/usr.bin/rpcgen/rpc_parse.h b/usr.bin/rpcgen/rpc_parse.h
index 4f3547b..1ddad6d 100644
--- a/usr.bin/rpcgen/rpc_parse.h
+++ b/usr.bin/rpcgen/rpc_parse.h
@@ -187,7 +187,7 @@ struct definition {
};
typedef struct definition definition;
-definition *get_definition();
+definition *get_definition(void);
struct bas_type
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index b960cd6..b162bdf 100644
--- a/usr.bin/rpcgen/rpc_sample.c
+++ b/usr.bin/rpcgen/rpc_sample.c
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
#include "rpc_parse.h"
+#include "rpc_scan.h"
#include "rpc_util.h"
diff --git a/usr.bin/rpcgen/rpc_scan.h b/usr.bin/rpcgen/rpc_scan.h
index 1b887b0..71f995c 100644
--- a/usr.bin/rpcgen/rpc_scan.h
+++ b/usr.bin/rpcgen/rpc_scan.h
@@ -127,10 +127,10 @@ typedef struct token token;
/*
* routine interface
*/
-void scan();
-void scan2();
-void scan3();
-void scan_num();
-void peek();
-int peekscan();
-void get_token();
+void scan(tok_kind expect, token *tokp);
+void scan2(tok_kind expect1, tok_kind expect2, token *tokp);
+void scan3(tok_kind expect1, tok_kind expect2, tok_kind expect3, token *tokp);
+void scan_num(token *tokp);
+void peek(token *tokp);
+int peekscan(tok_kind expect, token *tokp);
+void get_token(token *tokp);
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index 2450142..b174b6e 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
#include "rpc_parse.h"
+#include "rpc_scan.h"
#include "rpc_util.h"
extern int tirpc_socket;
diff --git a/usr.bin/rpcgen/rpc_tblout.c b/usr.bin/rpcgen/rpc_tblout.c
index aaa71c9..082e46a 100644
--- a/usr.bin/rpcgen/rpc_tblout.c
+++ b/usr.bin/rpcgen/rpc_tblout.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
#include "rpc_parse.h"
+#include "rpc_scan.h"
#include "rpc_util.h"
#define TABSIZE 8
diff --git a/usr.bin/rpcgen/rpc_util.h b/usr.bin/rpcgen/rpc_util.h
index ce21d4e..3e53a51 100644
--- a/usr.bin/rpcgen/rpc_util.h
+++ b/usr.bin/rpcgen/rpc_util.h
@@ -151,10 +151,10 @@ extern pid_t childpid;
/*
* rpc_util routines
*/
-void reinitialize();
-void crash();
+void reinitialize(void);
+void crash(void);
void add_type(int len, char *type);
-void storeval();
+void storeval(list **lstp, definition *val);
void *xmalloc(size_t size);
void *xrealloc(void *ptr, size_t size);
char *xstrdup(const char *str);
@@ -162,56 +162,56 @@ char *xstrdup(const char *str);
#define STOREVAL(list,item) \
storeval(list,item)
-definition *findval();
+definition *findval(list *lst, char *val, int (*cmp)(char *, char *));
#define FINDVAL(list,item,finder) \
findval(list, item, finder)
-char *fixtype();
-char *stringfix();
-char *locase();
-void pvname_svc();
-void pvname();
-void ptype();
-int isvectordef();
-int streq();
-void error();
-void expected1();
-void expected2();
-void expected3();
-void tabify();
-void record_open();
-bas_type *find_type();
+char *fixtype(char *type);
+char *stringfix(char *type);
+char *locase(char *str);
+void pvname_svc(char *pname, char *vnum);
+void pvname(char *pname, char *vnum);
+void ptype(char *prefix, char *type, int follow);
+int isvectordef(char *type, relation rel);
+int streq(char *a, char *b);
+void error(char *msg);
+void expected1(tok_kind exp1);
+void expected2(tok_kind exp1, tok_kind exp2);
+void expected3(tok_kind exp1, tok_kind exp2, tok_kind exp3);
+void tabify(FILE *f, int tab);
+void record_open(char *file);
+bas_type *find_type(char *type);
+
/*
* rpc_cout routines
*/
-void cprint();
-void emit();
+void emit(definition *def);
/*
* rpc_hout routines
*/
-void print_datadef();
-void print_funcdef();
-void print_xdr_func_def();
+void print_datadef(definition *def);
+void print_funcdef(definition *def);
+void print_xdr_func_def(char* name, int pointerp, int i);
/*
* rpc_svcout routines
*/
-void write_most();
-void write_register();
-void write_rest();
-void write_programs();
-void write_svc_aux();
-void write_inetd_register();
-void write_netid_register();
-void write_nettype_register();
+void write_most(char *infile, int netflag, int nomain);
+void write_rest(void);
+void write_programs(char *storage);
+void write_svc_aux(int nomain);
+void write_inetd_register(char *transp);
+void write_netid_register(char *transp);
+void write_nettype_register(char *transp);
+
/*
* rpc_clntout routines
*/
-void write_stubs();
+void write_stubs(void);
/*
* rpc_tblout routines
*/
-void write_tables();
+void write_tables(void);
OpenPOWER on IntegriCloud