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