-
Notifications
You must be signed in to change notification settings - Fork 2
/
cinter.f90
53 lines (43 loc) · 1.62 KB
/
cinter.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module cinter
interface
subroutine initscr() bind(C)
end subroutine initscr
subroutine endwin() bind(C)
! ncurses restares previous terminal contents (before program was run)
end subroutine endwin
function getch() result (ch) bind(C)
use iso_c_binding, only: c_int
integer(c_int) :: ch
end function getch
subroutine timeout(delay) bind (C)
use iso_c_binding, only: c_int
integer(c_int), value :: delay
end subroutine timeout
subroutine addch(ch) bind (C)
use iso_c_binding, only: c_char
character(c_char), intent(in), value :: ch
end subroutine addch
subroutine mvaddch(y, x, ch) bind (C)
use iso_c_binding, only: c_int, c_char
integer(c_int), intent(in), value :: y, x
character(c_char), intent(in), value :: ch
end subroutine mvaddch
subroutine clear() bind (C)
end subroutine clear
subroutine noecho() bind (C)
! don't echo keypresses to screen
end subroutine noecho
subroutine cbreak() bind (C)
! disable line buffer
end subroutine cbreak
subroutine mvprintw(y, x, str) bind (C)
use iso_c_binding, only: c_int, c_char
integer(c_int), intent(in), value :: y, x
character(c_char),intent(in) :: str
end subroutine mvprintw
subroutine usleep(time) bind (C)
use iso_c_binding, only: c_int
integer(c_int), value :: time
end subroutine usleep
end interface
end module cinter