dgaudet     98/03/29 17:22:53

  Modified:    .        STATUS
               src      CHANGES
               src/ap   ap_snprintf.c
               src/include ap.h
               src/main alloc.c buff.c
  Log:
  Satisfy the naming police.  I prefer ap_ anyhow.  I would be a lot happier
  with a single prefix as already noted in STATUS.
  
  Revision  Changes    Path
  1.237     +2 -2      apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.236
  retrieving revision 1.237
  diff -u -r1.236 -r1.237
  --- STATUS    1998/03/30 01:14:34     1.236
  +++ STATUS    1998/03/30 01:22:43     1.237
  @@ -119,7 +119,7 @@
       * Fix for symlink check in mod_rewrite's ``RewriteCond ... -l'', PR#2010
       * Fix: SIGXCPU and SIGXFSZ are now reset to SIG_DFL at boot-time
       * Dean's remove of HAVE_SNPRINTF
  -    * Dean's mutation of ap_snprintf() code into apapi_vformatter()
  +    * Dean's mutation of ap_snprintf() code into ap_vformatter()
       * Lars' fix for "Options +Includes" and "+IncludesNoExec" merging
       * Jim's fix for inconsistent usage of TCC and CC in Configure
       * Jim's fix for IRIX which needs the -n32 flag iff using 'cc', PR#1901
  @@ -285,7 +285,7 @@
                      machine. Could be OS problems..
   
     * vformatter TODO:
  -    - double check logic in apapi_vformatter(), and especially psprintf()
  +    - double check logic in ap_vformatter(), and especially psprintf()
       - add in and use the inaddr formatting codes that started the whole
         debate last october
       - ... so that we can finally start fixing all the log messages that
  
  
  
  1.749     +1 -1      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.748
  retrieving revision 1.749
  diff -u -r1.748 -r1.749
  --- CHANGES   1998/03/29 19:11:54     1.748
  +++ CHANGES   1998/03/30 01:22:45     1.749
  @@ -30,7 +30,7 @@
     *) "Options +Includes" wasn't correctly merged if "+IncludesNoExec"
        was defined in a parent directory. [Lars Eilebrecht]
   
  -  *) API: ap_snprintf() code mutated into apapi_vformatter(), which is
  +  *) API: ap_snprintf() code mutated into ap_vformatter(), which is
        a generic printf-style routine that can call arbitrary output
        routines.  Use this to replace http_bprintf.c.  Add new routines
        psprintf(), pvsprintf() which allocate the exact amount of memory
  
  
  
  1.17      +7 -7      apache-1.3/src/ap/ap_snprintf.c
  
  Index: ap_snprintf.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/ap/ap_snprintf.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ap_snprintf.c     1998/03/29 09:35:40     1.16
  +++ ap_snprintf.c     1998/03/30 01:22:47     1.17
  @@ -504,8 +504,8 @@
   /*
    * Do format conversion placing the output in buffer
    */
  -API_EXPORT(int) apapi_vformatter(int (*flush_func)(apapi_vformatter_buff *),
  -    apapi_vformatter_buff *vbuff, const char *fmt, va_list ap)
  +API_EXPORT(int) ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
  +    ap_vformatter_buff *vbuff, const char *fmt, va_list ap)
   {
       register char *sp;
       register char *bep;
  @@ -878,7 +878,7 @@
   }
   
   
  -static int snprintf_flush(apapi_vformatter_buff *vbuff)
  +static int snprintf_flush(ap_vformatter_buff *vbuff)
   {
       return -1;
   }
  @@ -888,7 +888,7 @@
   {
       int cc;
       va_list ap;
  -    apapi_vformatter_buff vbuff;
  +    ap_vformatter_buff vbuff;
   
       if (len == 0)
        return 0;
  @@ -897,7 +897,7 @@
       vbuff.curpos = buf;
       vbuff.endpos = buf + len - 1;
       va_start(ap, format);
  -    cc = apapi_vformatter(snprintf_flush, &vbuff, format, ap);
  +    cc = ap_vformatter(snprintf_flush, &vbuff, format, ap);
       va_end(ap);
       *vbuff.curpos = '\0';
       return (cc == -1) ? len : cc;
  @@ -908,7 +908,7 @@
                             va_list ap)
   {
       int cc;
  -    apapi_vformatter_buff vbuff;
  +    ap_vformatter_buff vbuff;
   
       if (len == 0)
        return 0;
  @@ -916,7 +916,7 @@
       /* save one byte for nul terminator */
       vbuff.curpos = buf;
       vbuff.endpos = buf + len - 1;
  -    cc = apapi_vformatter(snprintf_flush, &vbuff, format, ap);
  +    cc = ap_vformatter(snprintf_flush, &vbuff, format, ap);
       *vbuff.curpos = '\0';
       return (cc == -1) ? len : cc;
   }
  
  
  
  1.10      +10 -10    apache-1.3/src/include/ap.h
  
  Index: ap.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/ap.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ap.h      1998/03/29 09:35:41     1.9
  +++ ap.h      1998/03/30 01:22:48     1.10
  @@ -77,21 +77,21 @@
   #endif
   #endif /* WIN32 */
   
  -/* apapi_vformatter() is a generic printf-style formatting routine
  +/* ap_vformatter() is a generic printf-style formatting routine
    * with some extensions.
    *
  - * The apapi_vformatter_buff has two elements curpos and endpos.
  - * curpos is where apapi_vformatter will write the next byte of output.
  + * The ap_vformatter_buff has two elements curpos and endpos.
  + * curpos is where ap_vformatter will write the next byte of output.
    * It proceeds writing output to curpos, and updating curpos, until
    * either the end of output is reached, or curpos == endpos (i.e. the
    * buffer is full).
    *
  - * If the end of output is reached, apapi_vformatter returns the
  + * If the end of output is reached, ap_vformatter returns the
    * number of bytes written.
    *
    * When the buffer is full, the flush_func is called.  The flush_func
    * can return -1 to indicate that no further output should be attempted,
  - * and apapi_vformatter will return immediately with -1.  Otherwise
  + * and ap_vformatter will return immediately with -1.  Otherwise
    * the flush_func should flush the buffer in whatever manner is
    * appropriate, re-initialize curpos and endpos, and return 0.
    *
  @@ -99,18 +99,18 @@
    * write another byte at curpos when curpos == endpos.  So for
    * example, it's possible when the output exactly matches the buffer
    * space available that curpos == endpos will be true when
  - * apapi_vformatter returns.
  + * ap_vformatter returns.
    */
   
   typedef struct {
       char *curpos;
       char *endpos;
  -} apapi_vformatter_buff;
  +} ap_vformatter_buff;
   
  -API_EXPORT(int) apapi_vformatter(int (*flush_func)(apapi_vformatter_buff *),
  -    apapi_vformatter_buff *, const char *fmt, va_list ap);
  +API_EXPORT(int) ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
  +    ap_vformatter_buff *, const char *fmt, va_list ap);
   
  -/* These are snprintf implementations based on apapi_vformatter().
  +/* These are snprintf implementations based on ap_vformatter().
    *
    * Note that various standards and implementations disagree on the return
    * value of snprintf, and side-effects due to %n in the formatting string.
  
  
  
  1.83      +4 -4      apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- alloc.c   1998/03/29 09:35:42     1.82
  +++ alloc.c   1998/03/30 01:22:50     1.83
  @@ -779,7 +779,7 @@
    */
   
   struct psprintf_data {
  -    apapi_vformatter_buff vbuff;
  +    ap_vformatter_buff vbuff;
   #ifdef ALLOC_USE_MALLOC
       char *base;
   #else
  @@ -788,7 +788,7 @@
   #endif
   };
   
  -static int psprintf_flush(apapi_vformatter_buff *vbuff)
  +static int psprintf_flush(ap_vformatter_buff *vbuff)
   {
       struct psprintf_data *ps = (struct psprintf_data *)vbuff;
   #ifdef ALLOC_USE_MALLOC
  @@ -857,7 +857,7 @@
       /* need room at beginning for allocation_list */
       ps.vbuff.curpos = ps.base + CLICK_SZ;
       ps.vbuff.endpos = ps.base + 511;
  -    apapi_vformatter(psprintf_flush, &ps.vbuff, fmt, ap);
  +    ap_vformatter(psprintf_flush, &ps.vbuff, fmt, ap);
       *ps.vbuff.curpos++ = '\0';
       ptr = ps.base;
       /* shrink */
  @@ -880,7 +880,7 @@
       ps.vbuff.endpos = ps.blok->h.endp - 1;
       ps.got_a_new_block = 0;
   
  -    apapi_vformatter(psprintf_flush, &ps.vbuff, fmt, ap);
  +    ap_vformatter(psprintf_flush, &ps.vbuff, fmt, ap);
   
       strp = ps.vbuff.curpos;
       *strp++ = '\0';
  
  
  
  1.69      +4 -4      apache-1.3/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/buff.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- buff.c    1998/03/29 09:35:43     1.68
  +++ buff.c    1998/03/30 01:22:51     1.69
  @@ -1446,11 +1446,11 @@
   }
   
   struct bprintf_data {
  -    apapi_vformatter_buff vbuff;
  +    ap_vformatter_buff vbuff;
       BUFF *fb;
   };
   
  -static int bprintf_flush(apapi_vformatter_buff *vbuff)
  +static int bprintf_flush(ap_vformatter_buff *vbuff)
   {
       struct bprintf_data *b = (struct bprintf_data *)vbuff;
       BUFF *fb = b->fb;
  @@ -1476,7 +1476,7 @@
       b.vbuff.endpos = &fb->outbase[fb->bufsiz];
       b.fb = fb;
       va_start(ap, fmt);
  -    res = apapi_vformatter(bprintf_flush, &b.vbuff, fmt, ap);
  +    res = ap_vformatter(bprintf_flush, &b.vbuff, fmt, ap);
       va_end(ap);
       if (res != -1) {
        fb->outcnt += b.vbuff.curpos - (char *)&fb->outbase[fb->outcnt];
  @@ -1492,7 +1492,7 @@
       b.vbuff.curpos = &fb->outbase[fb->outcnt];
       b.vbuff.endpos = &fb->outbase[fb->bufsiz];
       b.fb = fb;
  -    res = apapi_vformatter(bprintf_flush, &b.vbuff, fmt, ap);
  +    res = ap_vformatter(bprintf_flush, &b.vbuff, fmt, ap);
       if (res != -1) {
        fb->outcnt += b.vbuff.curpos - (char *)&fb->outbase[fb->outcnt];
       }
  
  
  

Reply via email to