apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/tables apr_tables.c
Date Fri, 28 Jun 2002 14:04:36 GMT
wrowe       2002/06/28 07:04:36

  Modified:    file_io/os2 readwrite.c
               file_io/unix readwrite.c
               file_io/win32 readwrite.c
               include  apr_file_io.h apr_tables.h
               tables   apr_tables.c
  Log:
    Introduce apr_table_do_callback_fn_t as a prototype declaration, and
    consistify all broken APR_DECLARE() prototypes that were, in fact, always
    handled as APR_DECLARE_NONSTD() by the MSVC compiler.  Unfortunately, no
    emit is raised when the compiler ignores our APR_DECLARE() semantic.
  
  Revision  Changes    Path
  1.50      +2 -1      apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- readwrite.c	23 May 2002 09:53:53 -0000	1.49
  +++ readwrite.c	28 Jun 2002 14:04:35 -0000	1.50
  @@ -351,7 +351,8 @@
   
   
   
  -APR_DECLARE(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
  +APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, 
  +                                        const char *format, ...)
   {
       int cc;
       va_list ap;
  
  
  
  1.79      +2 -1      apr/file_io/unix/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/readwrite.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- readwrite.c	18 Apr 2002 14:24:17 -0000	1.78
  +++ readwrite.c	28 Jun 2002 14:04:35 -0000	1.79
  @@ -393,7 +393,8 @@
       return rv;
   }
   
  -APR_DECLARE(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
  +APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, 
  +                                        const char *format, ...)
   {
       apr_status_t cc;
       va_list ap;
  
  
  
  1.68      +2 -1      apr/file_io/win32/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/readwrite.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- readwrite.c	20 Mar 2002 08:54:43 -0000	1.67
  +++ readwrite.c	28 Jun 2002 14:04:35 -0000	1.68
  @@ -465,7 +465,8 @@
       return -1;
   }
   
  -APR_DECLARE(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
  +APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, 
  +                                        const char *format, ...)
   {
       int cc;
       va_list ap;
  
  
  
  1.127     +2 -1      apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_file_io.h,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- apr_file_io.h	8 Jun 2002 22:32:11 -0000	1.126
  +++ apr_file_io.h	28 Jun 2002 14:04:35 -0000	1.127
  @@ -566,7 +566,8 @@
    * @param ... The values to substitute in the format string
    * @return The number of bytes written
    */ 
  -APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
  +APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, 
  +                                        const char *format, ...)
           __attribute__((format(printf,2,3)));
   
   /**
  
  
  
  1.29      +16 -2     apr/include/apr_tables.h
  
  Index: apr_tables.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_tables.h,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- apr_tables.h	21 Jun 2002 14:24:25 -0000	1.28
  +++ apr_tables.h	28 Jun 2002 14:04:36 -0000	1.29
  @@ -349,6 +349,19 @@
                                                const apr_table_t *overlay,
                                                const apr_table_t *base);
   
  +/**
  + * Declaration prototype for the iterator callback function of apr_table_do()
  + * and apr_table_vdo().
  + * @param rec The data passed as the first argument to apr_table_[v]do()
  + * @param key The key from this iteration of the table
  + * @param key The value from this iteration of the table
  + * @remark Iteration continues while this callback function returns non-zero.
  + * To export the callback function for apr_table_[v]do() it must be declared 
  + * in the _NONSTD convention.
  + */
  +typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key, 
  +                                                    const char *value);
  +
   /** 
    * Iterate over a table running the provided function once for every
    * element in the table.  If there is data passed in as a vararg, then the 
  @@ -361,8 +374,9 @@
    * @param ... The vararg.  If this is NULL, then all elements in the table are
    *            run through the function, otherwise only those whose key matches
    *            are run.
  + * @see apr_table_do_callback_fn_t
    */
  -APR_DECLARE_NONSTD(void) apr_table_do(int (*comp)(void *, const char *, const char *),
  +APR_DECLARE_NONSTD(void) apr_table_do(apr_table_do_callback_fn_t *comp,
                                void *rec, const apr_table_t *t, ...);
   
   /** 
  @@ -378,7 +392,7 @@
    *                table are run through the function, otherwise only those 
    *                whose key matches are run.
    */
  -APR_DECLARE(void) apr_table_vdo(int (*comp)(void *, const char *, const char *),
  +APR_DECLARE(void) apr_table_vdo(apr_table_do_callback_fn_t *comp,
                                   void *rec, const apr_table_t *t, va_list);
   
   /** flag for overlap to use apr_table_setn */
  
  
  
  1.27      +5 -4      apr/tables/apr_tables.c
  
  Index: apr_tables.c
  ===================================================================
  RCS file: /home/cvs/apr/tables/apr_tables.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- apr_tables.c	11 Jun 2002 18:07:03 -0000	1.26
  +++ apr_tables.c	28 Jun 2002 14:04:36 -0000	1.27
  @@ -695,16 +695,17 @@
    *
    * So to make mod_file_cache easier to maintain, it's a good thing
    */
  -APR_DECLARE(void) apr_table_do(int (*comp) (void *, const char *, const char *),
  -			      void *rec, const apr_table_t *t, ...)
  +APR_DECLARE_NONSTD(void) apr_table_do(apr_table_do_callback_fn_t *comp,
  +                                      void *rec, const apr_table_t *t, ...)
   {
       va_list vp;
       va_start(vp, t);
       apr_table_vdo(comp, rec, t, vp);
       va_end(vp);  
   } 
  -APR_DECLARE(void) apr_table_vdo(int (*comp) (void *, const char *, const char *),
  -				void *rec, const apr_table_t *t, va_list vp)
  +
  +APR_DECLARE(void) apr_table_vdo(apr_table_do_callback_fn_t *comp,
  +                                void *rec, const apr_table_t *t, va_list vp)
   {
       char *argp;
       apr_table_entry_t *elts = (apr_table_entry_t *) t->a.elts;
  
  
  

Mime
View raw message