Ticket #93: patch.patch
File patch.patch, 1.4 KB (added by jimmy, 13 years ago) |
---|
-
editor/indent_pir.vim
1 " Description: imccindenter1 " Description: PIR indenter 2 2 " Author: Andrew Rodland <arodland@entermail.net> 3 3 " Maintainer: Jimmy Zhuo <zhuomingliang@yahoo.com.cn> 4 4 " Last Change: 2008 Dec 3 -
src/io/buffer.c
399 399 size_t avail = 0; 400 400 401 401 INTVAL buffer_flags = Parrot_io_get_buffer_flags(interp, filehandle); 402 unsigned char *buffer_next , *buffer_end;402 unsigned char *buffer_next; 403 403 404 404 STRING * const s = Parrot_io_make_string(interp, buf, 1); 405 405 … … 410 410 } 411 411 412 412 buffer_next = Parrot_io_get_buffer_next(interp, filehandle); 413 buffer_end = Parrot_io_get_buffer_end(interp, filehandle);414 413 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 427 414 /* (re)fill the buffer */ 428 415 if (! (buffer_flags & PIO_BF_READBUF)) { 429 416 size_t got;