apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1004302 - /apr/apr/trunk/test/testargs.c
Date Mon, 04 Oct 2010 16:05:44 GMT
Author: fuankg
Date: Mon Oct  4 16:05:44 2010
New Revision: 1004302

URL: http://svn.apache.org/viewvc?rev=1004302&view=rev
Log:
Renamed optarg -> opt_arg to avoid name clashes with system-own optarg.

Modified:
    apr/apr/trunk/test/testargs.c

Modified: apr/apr/trunk/test/testargs.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testargs.c?rev=1004302&r1=1004301&r2=1004302&view=diff
==============================================================================
--- apr/apr/trunk/test/testargs.c (original)
+++ apr/apr/trunk/test/testargs.c Mon Oct  4 16:05:44 2010
@@ -46,21 +46,21 @@ static void no_options_found(abts_case *
     apr_getopt_t *opt;
     apr_status_t rv;
     char ch;
-    const char *optarg;
+    const char *opt_arg;
     char str[8196];
 
     str[0] = '\0';
     rv = apr_getopt_init(&opt, p, largc, largv);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
    
-    while (apr_getopt(opt, "abcd", &ch, &optarg) == APR_SUCCESS) {
+    while (apr_getopt(opt, "abcd", &ch, &opt_arg) == APR_SUCCESS) {
         switch (ch) {
             case 'a':
             case 'b':
             case 'c':
             case 'd':
             default:
-                format_arg(str, ch, optarg);
+                format_arg(str, ch, opt_arg);
         }
     }
     ABTS_STR_EQUAL(tc, "option: a\n"
@@ -76,7 +76,7 @@ static void no_options(abts_case *tc, vo
     apr_getopt_t *opt;
     apr_status_t rv;
     char ch;
-    const char *optarg;
+    const char *opt_arg;
     char str[8196];
 
     str[0] = '\0';
@@ -86,13 +86,13 @@ static void no_options(abts_case *tc, vo
     opt->errfn = unknown_arg;
     opt->errarg = str;
    
-    while (apr_getopt(opt, "efgh", &ch, &optarg) == APR_SUCCESS) {
+    while (apr_getopt(opt, "efgh", &ch, &opt_arg) == APR_SUCCESS) {
         switch (ch) {
             case 'a':
             case 'b':
             case 'c':
             case 'd':
-                format_arg(str, ch, optarg);
+                format_arg(str, ch, opt_arg);
                 break;
             default:
                 break;
@@ -108,7 +108,7 @@ static void required_option(abts_case *t
     apr_getopt_t *opt;
     apr_status_t rv;
     char ch;
-    const char *optarg;
+    const char *opt_arg;
     char str[8196];
 
     str[0] = '\0';
@@ -118,10 +118,10 @@ static void required_option(abts_case *t
     opt->errfn = unknown_arg;
     opt->errarg = str;
    
-    while (apr_getopt(opt, "a:", &ch, &optarg) == APR_SUCCESS) {
+    while (apr_getopt(opt, "a:", &ch, &opt_arg) == APR_SUCCESS) {
         switch (ch) {
             case 'a':
-                format_arg(str, ch, optarg);
+                format_arg(str, ch, opt_arg);
                 break;
             default:
                 break;
@@ -137,7 +137,7 @@ static void required_option_notgiven(abt
     apr_getopt_t *opt;
     apr_status_t rv;
     char ch;
-    const char *optarg;
+    const char *opt_arg;
     char str[8196];
 
     str[0] = '\0';
@@ -147,10 +147,10 @@ static void required_option_notgiven(abt
     opt->errfn = unknown_arg;
     opt->errarg = str;
    
-    while (apr_getopt(opt, "a:", &ch, &optarg) == APR_SUCCESS) {
+    while (apr_getopt(opt, "a:", &ch, &opt_arg) == APR_SUCCESS) {
         switch (ch) {
             case 'a':
-                format_arg(str, ch, optarg);
+                format_arg(str, ch, opt_arg);
                 break;
             default:
                 break;
@@ -166,7 +166,7 @@ static void optional_option(abts_case *t
     apr_getopt_t *opt;
     apr_status_t rv;
     char ch;
-    const char *optarg;
+    const char *opt_arg;
     char str[8196];
 
     str[0] = '\0';
@@ -176,10 +176,10 @@ static void optional_option(abts_case *t
     opt->errfn = unknown_arg;
     opt->errarg = str;
    
-    while (apr_getopt(opt, "a::", &ch, &optarg) == APR_SUCCESS) {
+    while (apr_getopt(opt, "a::", &ch, &opt_arg) == APR_SUCCESS) {
         switch (ch) {
             case 'a':
-                format_arg(str, ch, optarg);
+                format_arg(str, ch, opt_arg);
                 break;
             default:
                 break;
@@ -195,7 +195,7 @@ static void optional_option_notgiven(abt
     apr_getopt_t *opt;
     apr_status_t rv;
     char ch;
-    const char *optarg;
+    const char *opt_arg;
     char str[8196];
 
     str[0] = '\0';
@@ -205,10 +205,10 @@ static void optional_option_notgiven(abt
     opt->errfn = unknown_arg;
     opt->errarg = str;
    
-    while (apr_getopt(opt, "a::", &ch, &optarg) == APR_SUCCESS) {
+    while (apr_getopt(opt, "a::", &ch, &opt_arg) == APR_SUCCESS) {
         switch (ch) {
             case 'a':
-                format_arg(str, ch, optarg);
+                format_arg(str, ch, opt_arg);
                 break;
             default:
                 break;



Mime
View raw message