File: swlogic.h

package info (click to toggle)
audacity 2.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 80,076 kB
  • sloc: cpp: 192,859; ansic: 158,072; sh: 34,021; python: 24,248; lisp: 7,495; makefile: 3,667; xml: 573; perl: 31; sed: 16
file content (197 lines) | stat: -rw-r--r-- 4,304 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/********************************************************************
*    swlogic.h - switch logic, loaded from various versions of switch.h
*
* Copyright 1989 Carnegie Mellon University
*
*********************************************************************/

/* 
 * When included, one of the following should be defined: 
 *         AZTEC (manx compiler, implies AMIGA)
 *         THINK_C (Think C compiler, implies Macintosh)
 *         __MWERKS__ (Metrowerks C compiler, implies Macintosh)
 *         LATTICE & DOS (Lattice compiler for IBM PC/AT/XT/CLONES)
 *         MICROSOFT & DOS (Microsoft compiler, implies IBM PC/AT/XT/CLONES)
 *         UNIX (emulator for UNIX)
 *         UNIX_ITC (ITC code for RS6000)
 *         UNIX_MACH (MACH ukernel system)
 */
 
/*------------------------------------------*/
/* Other switches that might be defined in switches.h are as follows: */
/* APPLICATION, SPACE_FOR_PLAY, MAX_CHANNELS */
/*------------------------------------------*/

/* We're moving toward the elimination of switches.h, so try to map
 * predefined constants into our standard constants shown above:
 */

/* CHANGE LOG
 * --------------------------------------------------------------------
 * 28Apr03  dm  new conditional compilation structure
 * 28Apr03  rbd remove macro redefinitions: MICROSOFT 
 */



/* Microsoft C compiler: */
#ifdef _MSC_VER
#endif
#ifdef _MSDOS
#define DOS
#endif

/* Quick C compiler: */
#ifndef DOS
#ifdef MICROSOFT
#define DOS
#endif
#endif

/* Borland C compiler: */
#ifdef __BORLANDC__
#define BORLAND
#define DOS
#endif

/* Borland Turbo C compiler: */
#ifdef __TURBOC__
#define BORLAND]
#define DOS
#endif

/* SGI systems */
#ifdef sgi
#ifndef UNIX
#define UNIX
#endif
#define UNIX_IRIX
#define MAX_CHANNELS 32
#endif

/* APPLICATION -- define APPLICATION if you want to disable
 * looking for command line switches in the midi interface.
 * I think this feature is here for the Piano Tutor project
 * and you should not define APPLICATION for CMU Midi Toolkit
 * projects (APPLICATION is a poor choice of terms):
 */


/* memory space management (system dependent):
 *      SPACE_FOR_PLAY must be enough space to allow
 *  seq to play a score.  This may include space for
 *  note-off events, I/O buffers, etc.
 */
#ifndef SPACE_FOR_PLAY
#define SPACE_FOR_PLAY 10000L
#endif


/* How many MIDI channels are there?  MACINTOSH can use 2 ports,
 * so it supports 32 channels.  Others have one port, 16 channels.
 * On the other hand, if you don't have all the MIDI ports plugged
 * into MIDI interfaces, CMT will just hang, so I'll compile with
 * just 16 channels.  The 32 channel option for the Mac is untested.
 */
#ifndef MAX_CHANNELS
#define MAX_CHANNELS 16
#endif


/*------------------------------------------*/
/* Now we get to the "logic": define things as a function of what
 * was defined in switches.h
 */

#ifdef THINK_C
#define MACINTOSH
#endif

#ifdef __MWERKS__
#define MACINTOSH
#endif

#ifdef MACINTOSH
#define MACINTOSH_OR_DOS
#define MACINTOSH_OR_UNIX
/* I don't know if THINK_C defines this and we need it for a few prototypes... */
#ifndef __STDC__
#define __STDC__
#endif
#ifndef TAB_WIDTH
#define TAB_WIDTH 4
#endif
#endif

#ifndef TAB_WIDTH
#define TAB_WIDTH 8
#endif

/*
 * If MIDIMGR is defined, compile for the Apple MIDI Manager
 * (Non MIDI manager code is no longer supported)
 */
#ifdef MACINTOSH
/* under Nyquist, the MidiMgr is not used, so you can't
 * receive or send Midi as in CMU MIDI Toolkit; however,
 * much of CMU MIDI Toolkit is used for Midi file IO
 */
#ifndef NYQUIST
#define MIDIMGR
#endif
#define USE_VSPRINTF
#endif

#ifdef BORLAND
#define DOS
#endif

#ifdef LATTICE322
#define DOS
#define OLD_PROTOTYPES
#endif

#ifdef UNIX_ITC
#define UNIX
#define ITC
#endif

#ifdef UNIX_MACH
#define UNIX
#define ITC
#endif

/* USE_VSPRINTF says vsprintf() is defined */
#ifdef ITC
#define USE_VSPRINTF
#endif
#ifdef AZTEC
#define USE_VSPRINTF
#endif


/* DOTS_FOR_ARGS says ANSI "..." notation is recognized */
#ifdef __STDC__
#define DOTS_FOR_ARGS
#endif
#ifdef UNIX_ITC
#define DOTS_FOR_ARGS
#endif
#ifdef BORLAND
#define DOTS_FOR_ARGS
#endif
#ifdef MICROSOFT
#define DOTS_FOR_ARGS
#endif

#ifdef DOS
#define MACINTOSH_OR_DOS
#else
#define huge
#endif

#ifdef UNIX
#define MACINTOSH_OR_UNIX
#endif

#define SWITCHES