cvsuser     03/07/29 12:01:37

  Modified:    io       io_buf.c
  Log:
  Don't use MIN and MAX macros. Patch courtesy of Juergen Boemmels
  
  Revision  Changes    Path
  1.7       +3 -6      parrot/io/io_buf.c
  
  Index: io_buf.c
  ===================================================================
  RCS file: /cvs/public/parrot/io/io_buf.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- io_buf.c  21 Jul 2003 18:00:45 -0000      1.6
  +++ io_buf.c  29 Jul 2003 19:01:37 -0000      1.7
  @@ -1,7 +1,7 @@
   /* io_buf.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *      $Id: io_buf.c,v 1.6 2003/07/21 18:00:45 chromatic Exp $
  + *      $Id: io_buf.c,v 1.7 2003/07/29 19:01:37 scog Exp $
    *  Overview:
    *      The "buf" layer of Parrot IO. Buffering and all the fun stuff.
    *
  @@ -62,9 +62,6 @@
   size_t PIO_buf_readthru(theINTERP, ParrotIOLayer *layer,
                              ParrotIO *io, void *buffer, size_t len);
   
  -#define MAX(a, b) ((a) > (b) ? (a) : (b))
  -#define MIN(a, b) ((a) < (b) ? (a) : (b))
  -
   /* XXX: This is not portable */
   #define IS_EOL(c) ((*c) == '\n')
   
  @@ -292,7 +289,7 @@
       if (b->flags & PIO_BF_READBUF) {
           size_t avail = b->endb - b->next;
   
  -        current = MIN(avail, len);
  +        current = avail < len ? avail : len;
           memcpy(out_buf, b->next, current);
           b->next += current;
   
  @@ -323,7 +320,7 @@
   
           got = PIO_buf_fill_readbuf(interpreter, l, io, b);
   
  -        len = MIN(len, got);
  +        len = len < got ? len : got;
       }
   
       /* read from the read_buffer */
  
  
  

Reply via email to