1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
8 *
9 * This program 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.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
19 #include <stdio.h>
20 #include <string.h>
21 #include <stdlib.h>
22 #include <assert.h>
29 #ifdef UNIX
30 # include <sys/stat.h>
31 #endif
55 }
58 }
61 }
62 }
67 }
74 }
78 }
84 }
86 }
90 }
96 }
98 }
102 }
104 /*
105 void F_nextmus (char *s) {
106 int i = F_findres(s);
107 if (i <= m_start || i >= m_end) {
108 i = m_start;
109 }
110 for (++i; ; ++i) {
111 if (i >= m_end) {
112 i = m_start + 1;
113 }
114 WADRES_getname(i, s);
115 if (cp866_strcasecmp(s, "MENU") == 0 ||
116 cp866_strcasecmp(s, "INTERMUS") == 0 ||
117 cp866_strcasecmp(s, "\x8a\x8e\x8d\x85\x96\x0") == 0) {
118 continue;
119 }
120 if (cp866_strncasecmp(s, "DMI", 3) != 0) {
121 break;
122 }
123 }
124 }
126 void F_randmus (char *s) {
127 int i;
128 int n = myrand(10);
129 for (i = 0; i < n; i++) {
130 F_nextmus(s);
131 }
132 }
133 */
143 }
146 }
147 }
153 #ifdef UNIX
159 }
162 #else
164 #endif
166 }
169 SDLRW_Stream rd;
176 }
181 }
182 }
183 }
186 SDLRW_Stream rd;
191 }
192 }
195 SDLRW_Stream wr;
200 }
201 }