Ticket #760: readline_eof.patch
| File readline_eof.patch, 1.1 KB (added by flh, 4 years ago) |
|---|
-
src/pmc/filehandle.pmc
368 368 string_result = Parrot_str_new(INTERP, r, 0); 369 369 mem_sys_free(r); 370 370 } 371 else { 372 Parrot_io_set_flags(interp, SELF, 373 (PARROT_FILEHANDLE(SELF)->flags | PIO_F_EOF)); 374 } 371 375 #else 372 376 if (got_prompt) 373 377 fprintf(stderr, "%s", prompt->strstart); -
compilers/pct/src/PCT/HLLCompiler.pir
591 591 592 592 ## display a prompt ourselves if readline isn't present 593 593 interactive_read: 594 $I0 = isfalse stdin # check if we've reached EOF 595 if $I0 goto interactive_end 594 596 code = stdin.'readline_interactive'(prompt) 595 if null code goto interactive_end596 597 unless code goto interactive_loop 597 598 concat code, "\n" 598 599 push_eh interactive_trap
