summaryrefslogtreecommitdiff
path: root/usr.bin/rdist/distopt.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-01-20 06:02:31 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-01-20 06:02:31 +0000
commitbde74c11b55212e3458cadedf10813dd313cc646 (patch)
tree9c0c6113605fcdc907f113b145e472a8839b02f4 /usr.bin/rdist/distopt.c
parent473718ff15e77809d461968c7542b6fa9787a18e (diff)
Move struct distoptinfo into distopt.c, killing the DISTOPTINFO typedef
Move struct msgtype and msgfacility into message.c, killing the MSGTYPE and MSGFACILITY typedefs Make getdistopt() static to distopt.c
Diffstat (limited to 'usr.bin/rdist/distopt.c')
-rw-r--r--usr.bin/rdist/distopt.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/rdist/distopt.c b/usr.bin/rdist/distopt.c
index adf341f1513..64b054f8f43 100644
--- a/usr.bin/rdist/distopt.c
+++ b/usr.bin/rdist/distopt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: distopt.c,v 1.11 2009/10/27 23:59:42 deraadt Exp $ */
+/* $OpenBSD: distopt.c,v 1.12 2015/01/20 06:02:30 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -39,7 +39,12 @@
/*
* Distfile Option Information
*/
-DISTOPTINFO distoptinfo[] = {
+struct distoptinfo {
+ opt_t do_value;
+ char *do_name;
+ char *do_arg;
+ size_t arg_size;
+} distoptinfo[] = {
{ DO_CHKNFS, "chknfs", NULL, 0},
{ DO_CHKREADONLY, "chkreadonly", NULL, 0},
{ DO_CHKSYM, "chksym", NULL, 0},
@@ -70,7 +75,7 @@ DISTOPTINFO distoptinfo[] = {
/*
* Get a Distfile Option entry named "name".
*/
-DISTOPTINFO *
+static struct distoptinfo *
getdistopt(char *name, int *len)
{
int i;
@@ -92,7 +97,7 @@ int
parsedistopts(char *str, opt_t *optptr, int doerrs)
{
char *string, *optstr;
- DISTOPTINFO *distopt;
+ struct distoptinfo *distopt;
int len;
/* strtok() is destructive */