httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/support ab.c
Date Thu, 10 Aug 2000 12:52:45 GMT
trawick     00/08/10 05:52:44

  Modified:    src/lib/apr/include apr_getopt.h
               src/lib/apr/misc/unix getopt.c
               src/support ab.c
  Log:
  Tweak apr_getopt() and its use in ab to avoid compiler warnings.
  (Note: apr_initopt() and/or its callers still need tweaking.)
  Submitted by:	Bill Rowe
  Reviewed by:	Jeff Trawick
  
  Revision  Changes    Path
  1.18      +3 -3      apache-2.0/src/lib/apr/include/apr_getopt.h
  
  Index: apr_getopt.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_getopt.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- apr_getopt.h	2000/08/09 18:00:15	1.17
  +++ apr_getopt.h	2000/08/10 12:52:28	1.18
  @@ -73,7 +73,7 @@
    * @param argc The number of arguments to parse
    * @param argv The array of arguments to parse
    * @tip Arguments 2 and 3 are most commonly argc and argv from main(argc, argv)
  - * @deffunc apr_status_t apr_initopt( apr_getopt_t **os, apr_pool_t *cont,int argc, char
const* const* argv)
  + * @deffunc apr_status_t apr_initopt(apr_getopt_t **os, apr_pool_t *cont,int argc, char
const* const* argv)
    */
   APR_EXPORT(apr_status_t) apr_initopt(apr_getopt_t **os, apr_pool_t *cont,
                                        int argc, char const* const* argv);
  @@ -93,10 +93,10 @@
    *             APR_BADARG   --  No argument followed @parameter:
    *             APR_SUCCESS  --  The next option was found.
    * </PRE>
  - * @deffunc apr_status_t apr_getopt(apr_getopt_t *os, const char *opts, char *optch, char
const** optarg)
  + * @deffunc apr_status_t apr_getopt(apr_getopt_t *os, const char *opts, char *optch, const
char **optarg)
    */
   APR_EXPORT(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts, 
  -                                    char *optch, char const** optarg);
  +                                    char *optch, const char **optarg);
   
   #endif  /* ! APR_GETOPT_H */
   
  
  
  
  1.21      +1 -1      apache-2.0/src/lib/apr/misc/unix/getopt.c
  
  Index: getopt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/getopt.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- getopt.c	2000/08/09 17:46:21	1.20
  +++ getopt.c	2000/08/10 12:52:29	1.21
  @@ -49,7 +49,7 @@
   }
   
   APR_EXPORT(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts, 
  -                                    char *optch, char const** optarg)
  +                                    char *optch, const char **optarg)
   {
       const char *p;
       const char *oli;  /* option letter list index */
  
  
  
  1.26      +7 -7      apache-2.0/src/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/support/ab.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ab.c	2000/08/09 15:01:59	1.25
  +++ ab.c	2000/08/10 12:52:37	1.26
  @@ -193,9 +193,9 @@
   time_t aprtimeout = 30 * APR_USEC_PER_SEC; /* timeout value */
   
   int use_html = 0;        	/* use html in the report */
  -char *tablestring;
  -char *trstring;
  -char *tdstring;
  +const char *tablestring;
  +const char *trstring;
  +const char *tdstring;
   
   int doclen = 0;        		/* the length the document should be */
   int totalread = 0;        	/* total number of bytes read */
  @@ -862,14 +862,14 @@
   static void copyright(void)
   {
       if (!use_html) {
  -        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.25 $>
apache-2.0");
  +        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.26 $>
apache-2.0");
           printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
           printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
           printf("\n");
       }
       else {
           printf("<p>\n");
  -        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.25 $");
  +        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.26 $");
           printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
           printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
           printf("</p>\n<p>\n");
  @@ -937,7 +937,7 @@
   
   /* read data to POST from file, save contents and length */
   
  -static int open_postfile(char *pfile)
  +static int open_postfile(const char *pfile)
   {
       apr_file_t *postfd = NULL;
       apr_finfo_t finfo;
  @@ -974,7 +974,7 @@
       char tmp[1024];
       apr_status_t status;
       apr_getopt_t *opt;
  -    char *optarg;
  +    const char *optarg;
       char c;
   
       /* table defaults  */
  
  
  

Mime
View raw message