cvsuser     03/08/12 03:09:41

  Modified:    io       io_win32.c
               t/pmc    io.t
  Log:
  23252 by Vladimir Lipskiy
  
  Revision  Changes    Path
  1.28      +7 -9      parrot/io/io_win32.c
  
  Index: io_win32.c
  ===================================================================
  RCS file: /cvs/public/parrot/io/io_win32.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -w -r1.27 -r1.28
  --- io_win32.c        11 Aug 2003 15:05:24 -0000      1.27
  +++ io_win32.c        12 Aug 2003 10:09:39 -0000      1.28
  @@ -1,7 +1,7 @@
   /* io_win32.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *      $Id: io_win32.c,v 1.27 2003/08/11 15:05:24 scog Exp $
  + *      $Id: io_win32.c,v 1.28 2003/08/12 10:09:39 leo Exp $
    *  Overview:
    *      This is the Parrot IO OS layer for Win32 platforms.
    *  Data Structure and Algorithms:
  @@ -228,16 +228,14 @@
   {
       DWORD countread;
       if (ReadFile(io->fd, (LPVOID) buffer, (DWORD) len, &countread, NULL))
  +        if (countread > 0)
           return (size_t)countread;
  -    else {
  -        if (GetLastError() != NO_ERROR) {
  -            /* FIXME : An error occured */
  -        }
  -        else if (len > 0) {
  +        else
               /* EOF if read 0 and bytes were requested */
               io->flags |= PIO_F_EOF;
  -        }
  -    }
  +    else if (GetLastError() != NO_ERROR)
  +            /* FIXME : An error occured */
  +        ;
       return 0;
   }
   
  
  
  
  1.10      +2 -0      parrot/t/pmc/io.t
  
  Index: io.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/pmc/io.t,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -w -r1.9 -r1.10
  --- io.t      9 Aug 2003 07:22:23 -0000       1.9
  +++ io.t      12 Aug 2003 10:09:41 -0000      1.10
  @@ -228,6 +228,8 @@
   Parrot overwrites
   OUTPUT
   
  +close FOO;
  +
   unlink("temp.file");
   
   output_is(<<'CODE', '012', 'standard file descriptors');
  
  
  

Reply via email to