diff options
| author | Russ Allbery <rra@stanford.edu> | 2007-10-07 21:58:10 +0000 | 
|---|---|---|
| committer | Russ Allbery <rra@stanford.edu> | 2007-10-07 21:58:10 +0000 | 
| commit | ac5e59e8c48e376e14f090497304742d073b50f3 (patch) | |
| tree | cf2f82a734e1b317df06c60471577c1d6b3d7861 | |
| parent | 3e221d9867c08835fef8e3f868f7482d82863005 (diff) | |
Use WALLET_SERVER and WALLET_PORT rather than SERVER and PORT.
| -rw-r--r-- | client/internal.h | 8 | ||||
| -rw-r--r-- | 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 <client/internal.h>  #include <util/util.h> -/* Usage message. */ +/* Usage message.  Use as a format and pass the port number. */  static const char usage_message[] = "\  Usage: wallet [options] <command> <type> <name> [<arg> ...]\n\         wallet [options] acl <command> <id> [<arg> ...]\n\ @@ -27,9 +27,9 @@ Options:\n\      -f <output>     For the get command, output file (default: stdout)\n\      -k <principal>  Kerberos principal of the server\n\      -h              Display this help\n\ -    -p <port>       Port of server (default: 4444)\n\ +    -p <port>       Port of server (default: %d)\n\      -S <srvtab>     For the get keytab command, srvtab output file\n\ -    -s <server>     Server hostname (default: " SERVER "\n\ +    -s <server>     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; | 
