1d14b89e1bba3a8a833c7a5c46fd87bae30be3e6
[ctsim.git] / include / cio.h
1 /*****************************************************************************
2 **  This is part of the CTSim program
3 **  Copyright (C) 1983-2000 Kevin Rosenberg
4 **
5 **  $Id: cio.h,v 1.8 2000/06/05 01:32:45 kevin Exp $
6 **  $Log: cio.h,v $
7 **  Revision 1.8  2000/06/05 01:32:45  kevin
8 **  Added C++ compatibility
9 **
10 **  Revision 1.7  2000/05/08 20:45:10  kevin
11 **  *** empty log message ***
12 **
13 **  Revision 1.6  2000/05/08 20:00:47  kevin
14 **  ANSI C changes
15 **
16 **  Revision 1.5  2000/05/07 12:46:19  kevin
17 **  made c++ compatible
18 **
19 **  Revision 1.4  2000/04/28 18:18:59  kevin
20 **  removed unused files
21 **
22 **  Revision 1.3  2000/04/28 14:14:16  kevin
23 **  *** empty log message ***
24 **
25 **
26 **  This program is free software; you can redistribute it and/or modify
27 **  it under the terms of the GNU General Public License (version 2) as
28 **  published by the Free Software Foundation.
29 **
30 **  This program is distributed in the hope that it will be useful,
31 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
32 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33 **  GNU General Public License for more details.
34 **
35 **  You should have received a copy of the GNU General Public License
36 **  along with this program; if not, write to the Free Software
37 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
38 ******************************************************************************/
39 #ifndef __CIO_H
40 #define __CIO_H
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* __cplusplus */
45
46
47 #define C_BLACK      0                  /* color codes */
48 #define C_BLUE       1
49 #define C_GREEN      2
50 #define C_CYAN       3
51 #define C_RED        4
52 #define C_MAGENTA    5
53 #define C_BROWN      6
54 #define C_WHITE      7
55 #define C_GREY       8
56 #define C_LTBLUE     9
57 #define C_LTGREEN   10
58 #define C_LTCYAN    11
59 #define C_LTRED     12
60 #define C_LTMAGENTA 13
61 #define C_YELLOW    14
62 #define C_LTWHITE   15
63
64 /*----------------------------------------------------------------------*/
65
66 /* screen character codes */
67
68 #define SC_BKSP           8
69 #define SC_TAB            9
70 #define SC_BLANK        ' '
71
72
73 /* audio.c */
74 void cio_beep(void);
75 void cio_tone(double freq, double length);
76
77 /* crtput.c */
78 void cio_put_c(int c);
79 void cio_put_cc(int c, int count);
80 void cio_put_str(const char *str);
81
82 /* kbget.c */
83 unsigned int cio_kb_getc(void);
84 void cio_kb_ungetc(unsigned int c);
85 char *cio_kb_gets(char *str, int maxlen);
86 unsigned int cio_kb_waitc(const char *astr, int beep);
87
88 #ifdef __cplusplus
89 }
90 #endif /* _cplusplus */
91
92 #endif