OSDN Git Service

upgrade to 3.6.2
[jnethack/source.git] / sys / winnt / stubs.c
1 /* NetHack 3.6  stubs.c       $NHDT-Date: 1524689357 2018/04/25 20:49:17 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.3 $ */
2 /*      Copyright (c) 2015 by Michael Allison              */
3 /* NetHack may be freely redistributed.  See license for details. */
4
5 #include "win32api.h"
6 #include "hack.h"
7
8 #ifdef GUISTUB
9 #ifdef TTYSTUB
10 #error You cannot compile this with both GUISTUB and TTYSTUB defined.
11 #endif
12
13 int GUILaunched;
14 struct window_procs mswin_procs = { "-guistubs" };
15
16 #ifdef QT_GRAPHICS
17 struct window_procs Qt_procs = { "-guistubs" };
18 int qt_tilewidth, qt_tileheight, qt_fontsize, qt_compact_mode;
19 #endif
20 void
21 mswin_destroy_reg()
22 {
23     return;
24 }
25
26 /* MINGW32 has trouble with both a main() and WinMain()
27  * so we move main for the MINGW tty version into this stub
28  * so that it is out of sight for the gui linkage.
29  */
30 #ifdef __MINGW32__
31 extern char default_window_sys[];
32 extern int mingw_main(int argc, char **argv);
33
34 int
35 main(argc, argv)
36 int argc;
37 char *argv[];
38 {
39     boolean resuming;
40
41     resuming = mingw_main(argc, argv);
42     nethack_exit(EXIT_SUCCESS);
43     /*NOTREACHED*/
44     return 0;
45 }
46 #endif
47
48 #endif /* GUISTUB */
49
50 /* =============================================== */
51
52 #ifdef TTYSTUB
53
54 HANDLE hConIn;
55 HANDLE hConOut;
56 int GUILaunched;
57 struct window_procs tty_procs = { "-ttystubs" };
58
59 void
60 win_tty_init(dir)
61 int dir;
62 {
63     return;
64 }
65
66 void
67 nttty_open(mode)
68 int mode;
69 {
70     return;
71 }
72
73 void
74 xputc(ch)
75 char ch;
76 {
77     return;
78 }
79
80 #if 1 /*JP*/
81 void
82 xputc2(ch1, ch2)
83 int ch1;
84 int ch2;
85 {
86     return;
87 }
88 #endif
89
90 void
91 xputs(s)
92 const char *s;
93 {
94     return;
95 }
96
97 void
98 raw_clear_screen()
99 {
100     return;
101 }
102
103 void
104 clear_screen()
105 {
106     return;
107 }
108
109 void
110 backsp()
111 {
112     return;
113 }
114
115 int
116 has_color(int color)
117 {
118     return 1;
119 }
120
121 #ifndef NO_MOUSE_ALLOWED
122 void
123 toggle_mouse_support()
124 {
125     return;
126 }
127 #endif
128
129 #ifdef PORT_DEBUG
130 void
131 win32con_debug_keystrokes()
132 {
133     return;
134 }
135 void
136 win32con_handler_info()
137 {
138     return;
139 }
140 #endif
141
142 void
143 map_subkeyvalue(op)
144 register char *op;
145 {
146     return;
147 }
148
149 /* this is used as a printf() replacement when the window
150  * system isn't initialized yet
151  */
152 void msmsg
153 VA_DECL(const char *, fmt)
154 {
155     VA_START(fmt);
156     VA_INIT(fmt, const char *);
157     VA_END();
158     return;
159 }
160
161 /*VARARGS1*/
162 void nttty_error
163 VA_DECL(const char *, s)
164 {
165     VA_START(s);
166     VA_INIT(s, const char *);
167     VA_END();
168     return;
169 }
170
171 #ifdef TTY_GRAPHICS
172 void
173 synch_cursor()
174 {
175     return;
176 }
177 #endif
178
179 void
180 more()
181 {
182     return;
183 }
184
185 void
186 nethack_enter_nttty()
187 {
188     return;
189 }
190
191 void
192 set_altkeyhandler(const char *inName)
193 {
194     return;
195 }
196 #endif /* TTYSTUBS */