1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #include <jni.h>
27 #include "SoundDefs.h"
28 #include "Configure.h" // put flags for debug msgs etc. here
29
30 // return 1 if this platform is big endian, or 0 for little endian
31 int UTIL_IsBigEndianPlatform();
32
33
34 // ERROR PRINTS
35 #ifdef USE_ERROR
36 #define ERROR0(string) { fprintf(stdout, (string)); fflush(stdout); }
37 #define ERROR1(string, p1) { fprintf(stdout, (string), (p1)); fflush(stdout); }
38 #define ERROR2(string, p1, p2) { fprintf(stdout, (string), (p1), (p2)); fflush(stdout); }
39 #define ERROR3(string, p1, p2, p3) { fprintf(stdout, (string), (p1), (p2), (p3)); fflush(stdout); }
40 #define ERROR4(string, p1, p2, p3, p4) { fprintf(stdout, (string), (p1), (p2), (p3), (p4)); fflush(stdout); }
41 #else
42 #define ERROR0(string)
43 #define ERROR1(string, p1)
44 #define ERROR2(string, p1, p2)
45 #define ERROR3(string, p1, p2, p3)
46 #define ERROR4(string, p1, p2, p3, p4)
|
1 /*
2 * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #include <jni.h>
27 #include "jni_util.h"
28 #include "SoundDefs.h"
29 #include "Configure.h" // put flags for debug msgs etc. here
30
31 // return 1 if this platform is big endian, or 0 for little endian
32 int UTIL_IsBigEndianPlatform();
33
34
35 // ERROR PRINTS
36 #ifdef USE_ERROR
37 #define ERROR0(string) { fprintf(stdout, (string)); fflush(stdout); }
38 #define ERROR1(string, p1) { fprintf(stdout, (string), (p1)); fflush(stdout); }
39 #define ERROR2(string, p1, p2) { fprintf(stdout, (string), (p1), (p2)); fflush(stdout); }
40 #define ERROR3(string, p1, p2, p3) { fprintf(stdout, (string), (p1), (p2), (p3)); fflush(stdout); }
41 #define ERROR4(string, p1, p2, p3, p4) { fprintf(stdout, (string), (p1), (p2), (p3), (p4)); fflush(stdout); }
42 #else
43 #define ERROR0(string)
44 #define ERROR1(string, p1)
45 #define ERROR2(string, p1, p2)
46 #define ERROR3(string, p1, p2, p3)
47 #define ERROR4(string, p1, p2, p3, p4)
|