/[LeafOK_CVS]/lbbs/include/io.h
ViewVC logotype

Diff of /lbbs/include/io.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.13 by sysadm, Fri May 2 03:34:58 2025 UTC Revision 1.21 by sysadm, Mon Jun 9 15:39:05 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2                                                          io.h  -  description                                                          io.h  -  description
3                                                           -------------------                                                           -------------------
4          begin                : Mon Oct 18 2004          Copyright            : (C) 2004-2025 by Leaflet
5          copyright            : (C) 2004 by Leaflet          Email                : leaflet@leafok.com
         email                : leaflet@leafok.com  
6   ***************************************************************************/   ***************************************************************************/
7    
8  /***************************************************************************  /***************************************************************************
9   *                                                                         *   *                                                                         *
10   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
11   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
12   *   the Free Software Foundation; either version 2 of the License, or     *   *   the Free Software Foundation; either version 3 of the License, or     *
13   *   (at your option) any later version.                                   *   *   (at your option) any later version.                                   *
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
# Line 20  Line 19 
19    
20  #include <stdio.h>  #include <stdio.h>
21    
 #define ESC_KEY '\033'  
22  #define CR '\r'  #define CR '\r'
23  #define LF '\n'  #define LF '\n'
24  #define BACKSPACE '\b'  #define BACKSPACE '\b'
25  #define BELL '\b'  #define BELL '\b'
26    #define KEY_TAB 9
27    #define KEY_ESC 27
28  #define KEY_SPACE '\040'  #define KEY_SPACE '\040'
29    
30  #ifndef EXTEND_KEY  #ifndef EXTEND_KEY
31  #define EXTEND_KEY  #define EXTEND_KEY
32    
33  #define KEY_NULL 0xffff  #define KEY_NULL 0xffff
34  #define KEY_TIMEOUT 0xfffe  #define KEY_TIMEOUT 0xfffe
35  #define KEY_CONTROL 0xff  #define KEY_CONTROL 0xff
 #define KEY_TAB 9  
 #define KEY_ESC 27  
36  #define KEY_UP 0x0101  #define KEY_UP 0x0101
37  #define KEY_DOWN 0x0102  #define KEY_DOWN 0x0102
38  #define KEY_RIGHT 0x0103  #define KEY_RIGHT 0x0103
39  #define KEY_LEFT 0x0104  #define KEY_LEFT 0x0104
40    #define KEY_CSI 0x011b // ESC ESC
41  #define KEY_HOME 0x0201  #define KEY_HOME 0x0201
42  #define KEY_INS 0x0202  #define KEY_INS 0x0202
43  #define KEY_DEL 0x0203  #define KEY_DEL 0x0203
44  #define KEY_END 0x0204  #define KEY_END 0x0204
45  #define KEY_PGUP 0x0205  #define KEY_PGUP 0x0205
46  #define KEY_PGDN 0x0206  #define KEY_PGDN 0x0206
47    
48  #define KEY_F1 0x0207  #define KEY_F1 0x0207
49  #define KEY_F2 0x0208  #define KEY_F2 0x0208
50  #define KEY_F3 0x0209  #define KEY_F3 0x0209
# Line 54  Line 55 
55  #define KEY_F8 0x020e  #define KEY_F8 0x020e
56  #define KEY_F9 0x020f  #define KEY_F9 0x020f
57  #define KEY_F10 0x0210  #define KEY_F10 0x0210
58  #endif  #define KEY_F11 0x0211
59    #define KEY_F12 0x0212
60    
61    #define KEY_SHIFT_F1 0x0213
62    #define KEY_SHIFT_F2 0x0214
63    #define KEY_SHIFT_F3 0x0215
64    #define KEY_SHIFT_F4 0x0216
65    #define KEY_SHIFT_F5 0x0217
66    #define KEY_SHIFT_F6 0x0218
67    #define KEY_SHIFT_F7 0x0219
68    #define KEY_SHIFT_F8 0x021a
69    #define KEY_SHIFT_F9 0x021b
70    #define KEY_SHIFT_F10 0x021c
71    #define KEY_SHIFT_F11 0x021d
72    #define KEY_SHIFT_F12 0x021e
73    
74    #define KEY_CTRL_F1 0x021f
75    #define KEY_CTRL_F2 0x0220
76    #define KEY_CTRL_F3 0x0221
77    #define KEY_CTRL_F4 0x0222
78    #define KEY_CTRL_F5 0x0223
79    #define KEY_CTRL_F6 0x0224
80    #define KEY_CTRL_F7 0x0225
81    #define KEY_CTRL_F8 0x0226
82    #define KEY_CTRL_F9 0x0227
83    #define KEY_CTRL_F10 0x0228
84    #define KEY_CTRL_F11 0x0229
85    #define KEY_CTRL_F12 0x022a
86    
87    #define KEY_CTRL_UP 0x0230
88    #define KEY_CTRL_DOWN 0x0231
89    #define KEY_CTRL_RIGHT 0x0232
90    #define KEY_CTRL_LEFT 0x0233
91    #define KEY_CTRL_HOME 0x0234
92    #define KEY_CTRL_END 0x0235
93    
94    #endif // EXPAND_KEY
95    
96  #define Ctrl(C) ((C) - 'A' + 1)  #define Ctrl(C) ((C) - 'A' + 1)
97    
98  #define DOECHO (1)  #define DOECHO (1)
99  #define NOECHO (0)  #define NOECHO (0)
100    
 extern int outc(char c);  
   
101  extern int prints(const char *format, ...);  extern int prints(const char *format, ...);
102    
103  extern int iflush();  extern int outc(char c);
104    
105    extern int iflush(void);
106    
107  extern int igetch(int clear_buf);  extern int igetch(int timeout);
108    
109  extern int igetch_t(long int sec);  extern int igetch_t(int sec);
110    
111  extern int ikbhit();  extern void igetch_reset(void);
112    
113  #endif //_IO_H_  #endif //_IO_H_


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1