apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr/strings apr_snprintf.c
Date Sun, 11 Feb 2001 00:12:11 GMT
rbb         01/02/10 16:12:11

  Modified:    .        CHANGES
               file_io/unix readwrite.c
               include  apr_lib.h apr_strings.h
               network_io/unix sa_common.c
               strings  apr_snprintf.c
  Log:
  Moved the prototypes for apr_snprintf and apr_vsnprintf to the
  apr_strings.h header, from apr_lib.h.  This location makes more
  sense.
  
  Revision  Changes    Path
  1.58      +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -d -b -w -u -r1.57 -r1.58
  --- CHANGES	2001/02/09 19:23:05	1.57
  +++ CHANGES	2001/02/11 00:12:10	1.58
  @@ -1,5 +1,9 @@
   Changes with APR b1  
   
  +  *) Moved the prototypes for apr_snprintf and apr_vsnprintf to the
  +     apr_strings.h header, from apr_lib.h.  This location makes more
  +     sense.  [Ryan Bloom]
  +
     *) Added the APR_TRY_COMPILE_NO_WARNING configure macro for testing a
        compile with -Werror as well as the APR_CHECK_ICONV_INBUF macro to
        test for annoying iconv prototype differences.
  
  
  
  1.65      +1 -0      apr/file_io/unix/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/readwrite.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -d -b -w -u -r1.64 -r1.65
  --- readwrite.c	2001/02/08 07:44:38	1.64
  +++ readwrite.c	2001/02/11 00:12:10	1.65
  @@ -53,6 +53,7 @@
    */
   
   #include "fileio.h"
  +#include "apr_strings.h"
   #include "apr_lock.h"
   
   /* The only case where we don't use wait_for_io_or_timeout is on
  
  
  
  1.51      +0 -42     apr/include/apr_lib.h
  
  Index: apr_lib.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_lib.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -d -b -w -u -r1.50 -r1.51
  --- apr_lib.h	2001/02/08 07:44:45	1.50
  +++ apr_lib.h	2001/02/11 00:12:11	1.51
  @@ -217,48 +217,6 @@
   APR_DECLARE(apr_status_t) apr_password_validate(const char *passwd, 
                                                   const char *hash);
   
  -/*
  - * These are snprintf implementations based on apr_vformatter().
  - *
  - * Note that various standards and implementations disagree on the return
  - * value of snprintf, and side-effects due to %n in the formatting string.
  - * apr_snprintf behaves as follows:
  - *
  - * Process the format string until the entire string is exhausted, or
  - * the buffer fills.  If the buffer fills then stop processing immediately
  - * (so no further %n arguments are processed), and return the buffer
  - * length.  In all cases the buffer is NUL terminated.
  - *
  - * In no event does apr_snprintf return a negative number.  It's not possible
  - * to distinguish between an output which was truncated, and an output which
  - * exactly filled the buffer.
  - */
  -
  -/**
  - * snprintf routine based on apr_vformatter.  This means it understands the 
  - * same extensions.
  - * @param buf The buffer to write to
  - * @param len The size of the buffer
  - * @param format The format string
  - * @param ... The arguments to use to fill out the format string.
  - * @deffunc int apr_snprintf(char *buf, size_t len, const char *format, ...)
  - */
  -APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, size_t len, 
  -                                     const char *format, ...)
  -	__attribute__((format(printf,3,4)));
  -
  -/**
  - * vsnprintf routine based on apr_vformatter.  This means it understands the 
  - * same extensions.
  - * @param buf The buffer to write to
  - * @param len The size of the buffer
  - * @param format The format string
  - * @param ap The arguments to use to fill out the format string.
  - * @deffunc int apr_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
  - */
  -APR_DECLARE(int) apr_vsnprintf(char *buf, size_t len, const char *format,
  -			       va_list ap);
  -
   /**
    * Display a prompt and read in the password from stdin.
    * @param prompt The prompt to display
  
  
  
  1.10      +42 -0     apr/include/apr_strings.h
  
  Index: apr_strings.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_strings.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -d -b -w -u -r1.9 -r1.10
  --- apr_strings.h	2001/01/18 20:07:21	1.9
  +++ apr_strings.h	2001/02/11 00:12:11	1.10
  @@ -208,6 +208,48 @@
                                                  char ***argv_out,
                                                  apr_pool_t *token_context);
   
  +/*
  + * These are snprintf implementations based on apr_vformatter().
  + *
  + * Note that various standards and implementations disagree on the return
  + * value of snprintf, and side-effects due to %n in the formatting string.
  + * apr_snprintf behaves as follows:
  + *
  + * Process the format string until the entire string is exhausted, or
  + * the buffer fills.  If the buffer fills then stop processing immediately
  + * (so no further %n arguments are processed), and return the buffer
  + * length.  In all cases the buffer is NUL terminated.
  + *
  + * In no event does apr_snprintf return a negative number.  It's not possible
  + * to distinguish between an output which was truncated, and an output which
  + * exactly filled the buffer.
  + */
  +
  +/**
  + * snprintf routine based on apr_vformatter.  This means it understands the
  + * same extensions.
  + * @param buf The buffer to write to
  + * @param len The size of the buffer
  + * @param format The format string
  + * @param ... The arguments to use to fill out the format string.
  + * @deffunc int apr_snprintf(char *buf, size_t len, const char *format, ...)
  + */
  +APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, size_t len,
  +                                     const char *format, ...)
  +        __attribute__((format(printf,3,4)));
  +
  +/**
  + * vsnprintf routine based on apr_vformatter.  This means it understands the
  + * same extensions.
  + * @param buf The buffer to write to
  + * @param len The size of the buffer
  + * @param format The format string
  + * @param ap The arguments to use to fill out the format string.
  + * @deffunc int apr_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
  + */
  +APR_DECLARE(int) apr_vsnprintf(char *buf, size_t len, const char *format,
  +                               va_list ap);
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.27      +1 -0      apr/network_io/unix/sa_common.c
  
  Index: sa_common.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -d -b -w -u -r1.26 -r1.27
  --- sa_common.c	2001/02/08 07:44:57	1.26
  +++ sa_common.c	2001/02/11 00:12:11	1.27
  @@ -65,6 +65,7 @@
   
   #include "apr.h"
   #include "apr_lib.h"
  +#include "apr_strings.h"
   
   #ifdef HAVE_STDLIB_H
   #include <stdlib.h>
  
  
  
  1.10      +1 -0      apr/strings/apr_snprintf.c
  
  Index: apr_snprintf.c
  ===================================================================
  RCS file: /home/cvs/apr/strings/apr_snprintf.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -d -b -w -u -r1.9 -r1.10
  --- apr_snprintf.c	2001/02/08 07:45:01	1.9
  +++ apr_snprintf.c	2001/02/11 00:12:11	1.10
  @@ -60,6 +60,7 @@
   #include "apr_private.h"
   
   #include "apr_lib.h"
  +#include "apr_strings.h"
   #include "apr_network_io.h"
   #include <math.h>
   #ifdef HAVE_CTYPE_H
  
  
  

Mime
View raw message