6 dawes 1.8 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject
12 * to the following conditions:
14 dawes 1.8 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer
19 * in the documentation and/or other materials provided with the
20 * distribution, and in the same place and form as other copyright,
21 * license and disclaimer information.
23 * 3. The end-user documentation included with the redistribution,
24 * if any, must include the following acknowledgment: "This product
25 * includes software developed by The XFree86 Project, Inc
26 * (http://www.xfree86.org/) and its contributors", in the same
27 * place and form as other third-party acknowledgments. Alternately,
28 * this acknowledgment may appear in the software itself, in the
29 * same form and location as other such third-party acknowledgments.
31 * 4. Except as contained in this notice, the name of The XFree86
32 * Project, Inc shall not be used in advertising or otherwise to
33 * promote the sale, use or other dealings in this Software without
34 * prior written authorization from The XFree86 Project, Inc.
35 dawes 1.8 *
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
38 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39 * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE
40 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
41 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
42 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
43 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
44 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
45 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
46 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
74 tsi 1.1 #define GetHighWord(x) (((int) (x)) >> 16)
76 #define GetHighWord(x) (((int) (x)) / 65536)
79 #if IMAGE_BYTE_ORDER == MSBFirst
80 #define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) (i))))
81 #define coordToInt(x,y) (((x) << 16) | ((y) & 0xffff))
82 #define intToX(i) (GetHighWord(i))
83 #define intToY(i) ((int) ((short) i))
85 #define intToCoord(i,x,y) (((x) = (int) ((short) (i))), ((y) = GetHighWord(i)))
86 #define coordToInt(x,y) (((y) << 16) | ((x) & 0xffff))
87 #define intToX(i) ((int) ((short) (i)))
88 #define intToY(i) (GetHighWord(i))
91 #endif /* _MICOORD_H_ */