Ticket #93: patch.patch

File patch.patch, 1.4 KB (added by jimmy, 6 years ago)
  • editor/indent_pir.vim

     
    1 " Description:  imcc indenter 
     1" Description:  PIR indenter 
    22" Author:   Andrew Rodland <arodland@entermail.net> 
    33" Maintainer: Jimmy Zhuo <zhuomingliang@yahoo.com.cn> 
    44" Last Change: 2008 Dec 3 
  • src/io/buffer.c

     
    399399    size_t  avail = 0; 
    400400 
    401401    INTVAL         buffer_flags = Parrot_io_get_buffer_flags(interp, filehandle); 
    402     unsigned char *buffer_next, *buffer_end; 
     402    unsigned char *buffer_next; 
    403403 
    404404    STRING * const s = Parrot_io_make_string(interp, buf, 1); 
    405405 
     
    410410    } 
    411411 
    412412    buffer_next  = Parrot_io_get_buffer_next(interp, filehandle); 
    413     buffer_end   = Parrot_io_get_buffer_end(interp, filehandle); 
    414413 
    415     /* read Data from buffer */ 
    416     if (buffer_flags & PIO_BF_READBUF) { 
    417         avail = buffer_end - buffer_next; 
    418  
    419         /* if we have data available, copy out the next byte */ 
    420         if (avail) { 
    421             memcpy(s->strstart, buffer_next, len); 
    422             s->bufused = s->strlen = len; 
    423             return len; 
    424         } 
    425     } 
    426  
    427414    /* (re)fill the buffer */ 
    428415    if (! (buffer_flags & PIO_BF_READBUF)) { 
    429416        size_t got;