repo.or.cz
/
sannot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial push
[sannot.git]
/
input.c
blob
5a287862c6092003ab8ebf56b184457dd96301a4
1
#include <stdio.h>
2
#include
"input.h"
3
4
enum
command
getCommand
()
5
{
6
char
character
=
getch
();
7
switch
(
character
)
8
{
9
case
'q'
:
10
return
quit
;
11
case
' '
:
12
return
toggle_startstop
;
13
case
10
:
14
return
input
;
15
case
'i'
:
16
return
edit
;
17
case
65
:
18
return
up
;
19
case
66
:
20
return
down
;
21
case
67
:
22
return
transport_forward
;
23
case
68
:
24
return
transport_rewind
;
25
case
72
:
26
return
home
;
27
case
9
:
28
return
indent
;
29
case
90
:
30
return
unindent
;
31
default
:
32
fprintf
(
stderr
,
"%d
\n
"
,
character
);
33
}
34
return
none
;
35
}