Block at REPL prompt until stdin or plot window has input.
0 for stdin, 1 for click in plot window, -1 when window close button is pressed (now or in cursor mode). Watches terminal stdin only: gfortran buffers piped stdin, so a poll could miss lines already read.
integer function kipp_wait_input() !! Block at REPL prompt until stdin or plot window has input. !! !! 0 for stdin, 1 for click in plot window, -1 when window close button is pressed (now or in !! cursor mode). Watches terminal stdin only: gfortran buffers piped stdin, so a poll could !! miss lines already read. kipp_wait_input = 0 if (.not. st%interactive .or. st%devid <= 0) return if (c_isatty(0_c_int) == 0) return flush (output_unit) call giza_select_device(st%devid) kipp_wait_input = giza_wait_fd_or_click(0_c_int) end function kipp_wait_input