1 /* Copyright 2013 Akira Ohta (akohta001@gmail.com)
2 This file is part of ntch.
4 The ntch is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 The ntch is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with ntch. If not, see <http://www.gnu.org/licenses/>.
21 extern char LOG_PATH[];
22 extern char USR_PATH[];
23 extern char USR_COOKIE_PATH[];
24 extern char USR_LOG_DB_PATH[];
26 extern int FORCE_REFRESH;
27 extern int THREAD_SORT_TYPE;
28 extern char EDITOR_CMD[];
32 #define NT_THREAD_SORT_BY_NUMBER 1
33 #define NT_THREAD_SORT_BY_UNREAD 2
34 #define NT_THREAD_SORT_BY_READ 3
36 #define NT_KEY_NONE (-1)
38 #define NT_KEY_DOWN 'j'
39 #define NT_KEY_LEFT 'h'
40 #define NT_KEY_RIGHT 'l'
41 #define NT_KEY_PAGEUP 'b'
42 #define NT_KEY_PAGEDOWN 'f'
43 #define NT_KEY_SELECT ' '
44 #define NT_KEY_QUIT 'q'
45 #define NT_KEY_CLOSE 'c'
46 #define NT_KEY_ERASE 'z'
47 #define NT_KEY_ADD 'a'
48 #define NT_KEY_DEL 'd'
49 #define NT_KEY_BOTTOM 'g'
50 #define NT_KEY_REFRESH 'r'
51 #define NT_KEY_COMMAND1 ':'
52 #define NT_KEY_COMMAND2 '/'
53 #define NT_KEY_COMMAND3 '?'
56 #define NT_COMMAND1_WRITE_MSG_1 "write"
57 #define NT_COMMAND1_WRITE_MSG_2 "w"
58 #define NT_COMMAND1_JMP_NEW_1 "new"
59 #define NT_COMMAND1_JMP_NEW_2 "n"
60 #define NT_COMMAND1_SORT_1 "sort"
61 #define NT_COMMAND1_SORT_2 "s"
62 #define NT_COMMAND1_SORT_NUMBER_1 "number"
63 #define NT_COMMAND1_SORT_NUMBER_2 "n"
64 #define NT_COMMAND1_SORT_READ_1 "read"
65 #define NT_COMMAND1_SORT_READ_2 "r"
66 #define NT_COMMAND1_SORT_UNREAD_1 "unread"
67 #define NT_COMMAND1_SORT_UNREAD_2 "u"
68 #define NT_COMMAND1_DEL_THREAD_LOG_1 "del"
69 #define NT_COMMAND1_DEL_THREAD_LOG_2 "d"
70 #define NT_COMMAND1_TREE_1 "tree"
71 #define NT_COMMAND1_TREE_2 "t"
72 #define NT_COMMAND1_ID_1 "id"
73 #define NT_COMMAND1_ID_2 "i"
75 extern int set_option(int argc, char* argv[]);