OSDN Git Service

wwww
[proj16/16.git] / 16 / ADT2PLAY / adt2play.c
1 /* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */
2 /* From input file "adt2play.pas" */
3
4
5 #include <p2c/p2c.h>
6 /* p2c: adt2play.pas, line 2: Warning: Could not find module DPMI [271] */
7
8
9 #include "dpmi.h"
10 /* p2c: typconst.inc, line 4: Warning: Mismatched '$' signs [241] */
11 /* p2c: typconst.inc, line 4: 
12  * Warning: Expected a semicolon, found 'ffffffff' [227] */
13
14 #ifndef A2PLAYER_H
15 #include "a2player.h"
16 #endif
17
18 #ifndef TIMERINT_H
19 #include "timerint.h"
20 #endif
21
22 #ifndef PARSERIO_H
23 #include "parserio.h"
24 #endif
25 /* p2c: adt2play.pas, line 3: 
26  * Warning: Could not find module STRINGIO [271] */
27
28 #include "stringio.h"
29 /* p2c: adt2play.pas, line 3: 
30  * Warning: Could not find module TXTSCRIO [271] */
31 #include "txtscrio.h"
32 /* p2c: unpk_lib.pas, line 1: 
33  * Warning: Unrecognized character 015 in file [247] */
34 /* p2c: unpk_lib.pas, line 2: 
35  * Warning: Unrecognized character 015 in file [247] */
36 /* p2c: unpk_lib.pas, line 3: 
37  * Warning: Unrecognized character 015 in file [247] */
38 /* p2c: unpk_lib.pas, line 4: 
39  * Warning: Expected IMPLEMENTATION, found a '/' [227] */
40 #ifndef UNPK_LIB_H
41 #include "unpk_lib.h"
42 #endif
43
44
45 #define _timer_xpos     198
46 #define _timer_ypos     5
47 #define _timer_color    1
48 #define _decay_bar_xpos  10
49 #define _decay_bar_ypos  140
50 #define _decay_bar_palette_start  250
51 #define _progress_xpos  8
52 #define _progress_ypos  155
53 #define _progress_color  251
54 #define _fname_xpos     8
55 #define _fname_ypos     170
56 #define _fname_color    255
57 #define _pos_str_xpos   8
58 #define _pos_str_ypos   186
59 #define _pos_str_color  252
60 /* p2c: adt2play.pas, line 30: Note: Characters >= 128 encountered [281] */
61 /* p2c: adt2play.pas, line 31: Note: Characters >= 128 encountered [281] */
62 /* p2c: adt2play.pas, line 32: Note: Characters >= 128 encountered [281] */
63 /* p2c: adt2play.pas, line 33: Note: Characters >= 128 encountered [281] */
64 /* p2c: adt2play.pas, line 39: Note: Characters >= 128 encountered [281] */
65
66
67
68 #define kBkSPC          0xe08
69 #define kESC            0x11b
70 #define kENTER          0x1c0d
71
72
73 Static double decay_bar_rise = 10.0, decay_bar_fall = 0.50;
74 Static boolean adjust_tracks = true, accurate_conv = true,
75                fix_c_note_bug = true;
76 Static uchar window_top = 8;
77
78 Static Char modname[15][40] = {
79   "/\264DLiB TR/\264CK3R ][ module", "/\264DLiB TR/\264CK3R ][ G3 module",
80   "/\264DLiB TR/\264CK3R ][ tiny module",
81   "/\264DLiB TR/\264CK3R ][ G3 tiny module", "Amusic module",
82   "XMS-Tracker module", "BoomTracker 4.0 module", "Digital-FM module",
83   "HSC AdLib Composer / HSC-Tracker module", "MPU-401 tr\222kk\356r module",
84   "Reality ADlib Tracker module", "Scream Tracker 3.x module",
85   "FM-Kingtracker module", "Surprise! AdLib Tracker module",
86   "Surprise! AdLib Tracker 2.0 module"
87 };
88
89 Static Char songdata_source[256];
90 Static Char songdata_title[256];
91 Static uchar load_flag;
92 Static unsigned short fkey;
93 Static uchar index_, last_order;
94 Static SearchRec dirinfo;
95
96 Static uchar buf1[sizeof(tVARIABLE_DATA)];
97 Static uchar buf2[65535L];
98 Static uchar buf3[65535L];
99 Static uchar buf4[65535L];
100 Static uchar temp_screen[8192];
101 Static short correction;
102 Static uchar entries, entries2, temp, temp2;
103 Static unsigned short dos_memavail;
104 Static Char _ParamStr[256][256];
105 Static boolean jukebox = false;
106
107
108 Static Void ResetF(f)
109 FILE **f;
110 {
111   unsigned short fattr;
112
113   strcpy(_debug_str_, "ADT2PLAY.PAS:ResetF_RW");
114   GetFAttr(*f, fattr);
115 /* p2c: adt2play.pas, line 81:
116  * Warning: Symbol 'GETFATTR' is not defined [221] */
117   if ((fattr & ReadOnly) == ReadOnly) {
118     FileMode = 0;
119 /* p2c: adt2play.pas, line 82:
120  * Warning: Symbol 'FILEMODE' is not defined [221] */
121   }
122 /* p2c: adt2play.pas, line 84:
123  * Note: Can't interpret name argument in RESET [180] */
124   rewind(*f);
125 }
126
127
128 Static Void BlockReadF(f, data, size, bytes_read)
129 FILE **f;
130 Anyptr data;
131 long size, *bytes_read;
132 {
133   strcpy(_debug_str_, "ADT2PLAY.PAS:BlockReadF");
134   *bytes_read = fread(data, 1, size, *f);
135   P_ioresult = 0;
136   if (false)
137     *bytes_read = 0;
138 }
139
140
141 Static Void SeekF(f, fpos)
142 FILE **f;
143 long fpos;
144 {
145   strcpy(_debug_str_, "ADT2PLAY.PAS:SeekF");
146   _SETIO(fseek(*f, fpos, 0) == 0, EndOfFile);
147 }
148
149
150 Static Void CloseF(f)
151 FILE **f;
152 {
153   strcpy(_debug_str_, "ADT2PLAY.PAS:CloseF");
154   if (*f != NULL)
155     fclose(*f);
156   *f = NULL;
157 }
158 /* p2c: adt2play.pas, line 114: 
159  * Warning: Expected BEGIN, found 'assembler' [227] */
160
161
162 extern unsigned short min PP((int value, int minimum));
163
164 main(argc, argv)
165 int argc;
166 Char *argv[];
167 {
168   PASCAL_MAIN(argc, argv);
169 /* p2c: adt2play.pas, line 115:
170  * Warning: Expected BEGIN, found 'asm' [227] */
171   exit(EXIT_SUCCESS);
172 }
173 /* p2c: adt2play.pas, line 123: 
174  * Warning: Junk at end of input file ignored [277] */
175
176
177
178
179 /* End. */