diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 1999-11-22 14:52:16 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 1999-11-22 14:52:16 +0000 |
commit | e83dce462fc0b1870657a9e4360f13655fddcb99 (patch) | |
tree | bbb164b857c2c18100879da0ad0029bc4e332e41 /test/testargs.c | |
parent | f0066404e6b82571a29e3151b9b223b3a07ccff2 (diff) | |
download | libapr-e83dce462fc0b1870657a9e4360f13655fddcb99.tar.gz |
Clean up the getopt stuff a bit. Basically, I am removing the #define's,
and changing the names in the getopt.c file so that we are sure there is
no namespace collision between regular getopt's, and APR's getopt.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59483 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testargs.c')
-rw-r--r-- | test/testargs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/testargs.c b/test/testargs.c index a5ecaf5c6..2f5b6bfd6 100644 --- a/test/testargs.c +++ b/test/testargs.c @@ -57,13 +57,12 @@ #include "apr_errno.h" #include "apr_general.h" #include "apr_lib.h" +#include "apr_getopt.h" #include <stdio.h> #ifdef BEOS #include <unistd.h> #endif -API_VAR_IMPORT char *optarg; /* argument associated with option */ - int main(int argc, char * const argv[]) { ap_context_t *context; @@ -78,12 +77,12 @@ int main(int argc, char * const argv[]) printf("option %c\n", data); break; case 'c': - printf("option %c with %s\n", data, optarg); + printf("option %c with %s\n", data, ap_optarg); break; case 'd': printf("option %c", data); if (optarg) { - printf(" with %s\n", optarg); + printf(" with %s\n", ap_optarg); } else { printf("\n"); |