From ac5e59e8c48e376e14f090497304742d073b50f3 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 7 Oct 2007 21:58:10 +0000 Subject: Use WALLET_SERVER and WALLET_PORT rather than SERVER and PORT. --- client/internal.h | 8 ++++---- client/wallet.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/internal.h b/client/internal.h index a32ed23..cbc1030 100644 --- a/client/internal.h +++ b/client/internal.h @@ -18,11 +18,11 @@ struct remctl; /* Temporary until we have some real configuration. */ -#ifndef SERVER -# define SERVER "wallet.stanford.edu" +#ifndef WALLET_SERVER +# define WALLET_SERVER "wallet.stanford.edu" #endif -#ifndef PORT -# define PORT 4444 +#ifndef WALLET_PORT +# define WALLET_PORT 4444 #endif BEGIN_DECLS diff --git a/client/wallet.c b/client/wallet.c index 4a99794..f7ea410 100644 --- a/client/wallet.c +++ b/client/wallet.c @@ -17,7 +17,7 @@ #include #include -/* Usage message. */ +/* Usage message. Use as a format and pass the port number. */ static const char usage_message[] = "\ Usage: wallet [options] [ ...]\n\ wallet [options] acl [ ...]\n\ @@ -27,9 +27,9 @@ Options:\n\ -f For the get command, output file (default: stdout)\n\ -k Kerberos principal of the server\n\ -h Display this help\n\ - -p Port of server (default: 4444)\n\ + -p Port of server (default: %d)\n\ -S For the get keytab command, srvtab output file\n\ - -s Server hostname (default: " SERVER "\n\ + -s Server hostname (default: " WALLET_SERVER "\n\ -v Display the version of wallet\n"; @@ -39,7 +39,7 @@ Options:\n\ static void usage(int status) { - fprintf((status == 0) ? stdout : stderr, "%s", usage_message); + fprintf((status == 0) ? stdout : stderr, usage_message, WALLET_PORT); exit(status); } @@ -54,9 +54,9 @@ main(int argc, char *argv[]) int option, i, status; const char **command; const char *type = "wallet"; - const char *server = SERVER; + const char *server = WALLET_SERVER; const char *principal = NULL; - unsigned short port = PORT; + unsigned short port = WALLET_PORT; const char *file = NULL; const char *srvtab = NULL; struct remctl *r; -- cgit v1.2.3